-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add e2e tests for all platforms
Signed-off-by: peefy <[email protected]>
- Loading branch information
Showing
7 changed files
with
205 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ run: | |
|
||
test: | ||
make -C crd | ||
make -C jsonschema |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
run: | ||
kcl import -m jsonschema test.schema.json | ||
|
||
test: | ||
make run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"$id": "https://example.com/monaco.manifest.schema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "Dynatrace Monitoring as Code Manifest File", | ||
"type": "object", | ||
"properties": { | ||
"manifestVersion": { | ||
"type": "string", | ||
"description": "The schema version this manifest conforms to - e.g. 1.0" | ||
}, | ||
"projects": { | ||
"type": "array", | ||
"description": "The projects grouped by this manifest", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of this project" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"description": "Optional Type of this project. Default: Simple", | ||
"oneOf": [ | ||
{ | ||
"const": "simple", | ||
"description": "A simple project, directly containing configuration. Default." | ||
}, | ||
{ | ||
"const": "grouping", | ||
"description": "A grouping project, containing several sub-projects." | ||
} | ||
] | ||
}, | ||
"path": { | ||
"type": "string", | ||
"description": "Optional filepath of the project relative to the manifest.yaml location. Defaults to name" | ||
} | ||
}, | ||
"required": [ | ||
"name" | ||
] | ||
} | ||
}, | ||
"environmentGroups": { | ||
"description": "The Environment groups to which projects in this manifest are deployed", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of this environment group" | ||
}, | ||
"environments": { | ||
"description": "The environments in this group", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of this environment" | ||
}, | ||
"url": { | ||
"description": "The URL of this environment", | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"description": "Optional Type of URL definition.", | ||
"type": "string", | ||
"oneOf": [ | ||
{ | ||
"const": "value", | ||
"description": "URL directly defined in the 'value'. Default." | ||
}, | ||
{ | ||
"const": "environment", | ||
"description": "URL defined by an environment variable name in 'value' to read from." | ||
} | ||
] | ||
}, | ||
"value": { | ||
"type": "string", | ||
"description": "The value of the URL, based on type either an URL or environment variable name" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"manifestVersion", | ||
"projects", | ||
"environmentGroups" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
""" | ||
This file was generated by the KCL auto-gen tool. DO NOT EDIT. | ||
Editing this file might prove futile when you re-run the KCL auto-gen generate command. | ||
""" | ||
|
||
schema MonacoManifestSchema: | ||
""" | ||
MonacoManifestSchema | ||
|
||
Attributes | ||
---------- | ||
manifest_version : str, required | ||
The schema version this manifest conforms to - e.g. 1.0 | ||
projects : [items], required | ||
The projects grouped by this manifest | ||
environment_groups : [items], required | ||
The Environment groups to which projects in this manifest are deployed | ||
""" | ||
|
||
manifest_version: str | ||
projects: [items] | ||
environment_groups: [items] | ||
|
||
schema Url: | ||
""" | ||
The URL of this environment | ||
|
||
Attributes | ||
---------- | ||
type : str, optional | ||
Optional Type of URL definition. | ||
value : str, optional | ||
The value of the URL, based on type either an URL or environment variable name | ||
""" | ||
|
||
type?: str | ||
value?: str | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Stop on error. | ||
# Note: Before you start tests, please install kcl and kpm | ||
# kcl Installation: https://kcl-lang.io/docs/user_docs/getting-started/install | ||
# kpm Installation: https://kcl-lang.io/docs/user_docs/guides/package-management/installation | ||
$ErrorActionPreference = "Stop" | ||
$pwd = Split-Path -Parent $MyInvocation.MyCommand.Path | ||
|
||
$paths = @("configuration", "validation", "abstraction", "definition", "konfig", "mutation", "data-integration", "automation", "package-management", "kubernetes", "codelab", "server") | ||
foreach ($path in $paths) { | ||
Write-Host "Testing $path ..." | ||
Set-Location -Path "$pwd\$path" | ||
try { | ||
& make windows | Out-Host | ||
Write-Host "Test SUCCESSED - $path" -ForegroundColor Green | ||
} | ||
catch { | ||
Write-Host "Test FAILED - $path" -ForegroundColor Red | ||
exit 1 | ||
} | ||
Write-Host "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters