Skip to content

Commit

Permalink
chore: add test components fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed Oct 10, 2023
1 parent 58370e9 commit 53ebfa3
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions test-components.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#yaml-language-server: $schema=../../generate-schemas/schemas/system.schema.json
apiVersion: canaries.flanksource.com/v1
kind: Topology
metadata:
name: test-topology-property-merge
spec:
schedule: "@every 10m"
components:
- name: root
icon: server
owner: infra
components:
- name: RootComponents
type: virtual
icon: server
lookup:
http:
- endpoint: https://httpbin.demo.aws.flanksource.com/status/200
name: http-lookup
display:
expr: |
[
{
'name': 'component-a',
'type': 'API',
'properties': [{'name': 'error_percentage', 'min': 0, 'max': 100}, {'name': 'owner'}]
},
{
'name': 'component-b',
'type': 'Frontend',
'properties': [{'name': 'error_percentage', 'min': 0, 'max': 100}, {'name': 'owner'}]
},
{
'name': 'component-c',
'type': 'Database',
'properties': [{'name': 'error_percentage', 'min': 0, 'max': 100}, {'name': 'owner'}]
},
].marshalJSON()
properties:
- name: error_percentage
lookup:
http:
- endpoint: https://httpbin.demo.aws.flanksource.com/status/200
name: error_percentage_lookup
display:
expr: |
[
{
'name': 'component-a',
'properties': [{'name': 'error_percentage', 'value': 1}]
},
{
'name': 'component-b',
'properties': [{'name': 'error_percentage', 'value': 10}]
},
{
'name': 'component-c',
'properties': [{'name': 'error_percentage', 'value': 50}]
},
].marshalJSON()
- name: owner
lookup:
http:
- endpoint: https://httpbin.demo.aws.flanksource.com/status/200
name: owner_lookup
display:
expr: |
[
{
'name': 'component-a',
'properties': [{'name': 'owner', 'text': 'team-a'}]
},
{
'name': 'component-b',
'properties': [{'name': 'owner', 'text': 'team-b'}]
},
{
'name': 'component-c',
'properties': [{'name': 'owner', 'text': 'team-b'}]
},
].marshalJSON()

0 comments on commit 53ebfa3

Please sign in to comment.