Skip to content

Commit

Permalink
Merge branch 'main' into TLSENG-65
Browse files Browse the repository at this point in the history
  • Loading branch information
saltiyazan committed Oct 10, 2024
2 parents 5726d19 + 81cd7c5 commit 1bcc5d1
Show file tree
Hide file tree
Showing 39 changed files with 792 additions and 297 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ For the time being, to see available interfaces, their statuses, and schemas, br

# Relation interface testers

In order to automatically validate whether a charm satisfies a given relation interface, the relation interface maintainer(s) need to write one or more **relation interface tests**. A relation interface test is a [scenario-based test case](https://github.com/canonical/ops-scenario) which checks that, given an intitial context, when a relation event is triggered, the charm will do what the interface specifies. For example, most interface testers will check that, on relation changed, the charm will write a certain value into its (app/unit) databag and that that value matches a certain (Pydantic) schema.
In order to automatically validate whether a charm satisfies a given relation interface, the relation interface maintainer(s) need to write one or more **relation interface tests**. A relation interface test is a [scenario-based test case](https://github.com/canonical/ops-scenario) which checks that, given an initial context, when a relation event is triggered, the charm will do what the interface specifies. For example, most interface testers will check that, on relation changed, the charm will write a certain value into its (app/unit) databag and that that value matches a certain (Pydantic) schema.

See [the tester documentation](https://github.com/canonical/interface-tester-pytest) for more.
6 changes: 1 addition & 5 deletions docs/json_schemas/dns_record/v0/provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@
"type": "string"
},
"status": {
"allOf": [
{
"$ref": "#/$defs/Status"
}
],
"$ref": "#/$defs/Status",
"description": "Status for the domain request.",
"examples": [
"approved",
Expand Down
12 changes: 2 additions & 10 deletions docs/json_schemas/dns_record/v0/requirer.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,7 @@
"type": "integer"
},
"record_class": {
"allOf": [
{
"$ref": "#/$defs/RecordClass"
}
],
"$ref": "#/$defs/RecordClass",
"default": null,
"description": "The DNS record class.",
"examples": [
Expand All @@ -114,11 +110,7 @@
"name": "Record class"
},
"record_type": {
"allOf": [
{
"$ref": "#/$defs/RecordType"
}
],
"$ref": "#/$defs/RecordType",
"default": null,
"description": "The DNS record type.",
"examples": [
Expand Down
48 changes: 48 additions & 0 deletions docs/json_schemas/fiveg_rfsim/v0/provider.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$defs": {
"BaseModel": {
"properties": {},
"title": "BaseModel",
"type": "object"
},
"FivegRFSIMProviderAppData": {
"properties": {
"rfsim_address": {
"description": "RF simulator service ip",
"examples": [
"192.168.70.130"
],
"title": "Rfsim Address",
"type": "string"
}
},
"required": [
"rfsim_address"
],
"title": "FivegRFSIMProviderAppData",
"type": "object"
}
},
"description": "Provider schema for the fiveg_rfsim interface.",
"properties": {
"unit": {
"anyOf": [
{
"$ref": "#/$defs/BaseModel"
},
{
"type": "null"
}
],
"default": null
},
"app": {
"$ref": "#/$defs/FivegRFSIMProviderAppData"
}
},
"required": [
"app"
],
"title": "ProviderSchema",
"type": "object"
}
36 changes: 36 additions & 0 deletions docs/json_schemas/fiveg_rfsim/v0/requirer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$defs": {
"BaseModel": {
"properties": {},
"title": "BaseModel",
"type": "object"
}
},
"description": "Requirer schema for the fiveg_rfsim interface.",
"properties": {
"unit": {
"anyOf": [
{
"$ref": "#/$defs/BaseModel"
},
{
"type": "null"
}
],
"default": null
},
"app": {
"anyOf": [
{
"$ref": "#/$defs/BaseModel"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "RequirerSchema",
"type": "object"
}
6 changes: 1 addition & 5 deletions docs/json_schemas/kratos_external_idp/v0/provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
"type": "string"
},
"secret_backend": {
"allOf": [
{
"$ref": "#/$defs/SecretBackend"
}
],
"$ref": "#/$defs/SecretBackend",
"default": "relation"
},
"provider": {
Expand Down
12 changes: 2 additions & 10 deletions docs/json_schemas/smtp/v0/provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,15 @@
"title": "Password ID"
},
"auth_type": {
"allOf": [
{
"$ref": "#/$defs/AuthType"
}
],
"$ref": "#/$defs/AuthType",
"description": "The type used to authenticate with the SMTP relay.",
"examples": [
"none"
],
"title": "Auth type"
},
"transport_security": {
"allOf": [
{
"$ref": "#/$defs/TransportSecurity"
}
],
"$ref": "#/$defs/TransportSecurity",
"description": "The security protocol to use for the SMTP relay.",
"examples": [
"none"
Expand Down
65 changes: 56 additions & 9 deletions docs/json_schemas/tempo_cluster/v0/provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,26 @@
"TempoClusterProviderAppData": {
"description": "TempoClusterProviderAppData.",
"properties": {
"tempo_config": {
"worker_config": {
"contentMediaType": "application/json",
"contentSchema": {
"type": "string"
},
"description": "The tempo configuration that the requirer should run with.Yaml-encoded. Must conform to the schema that the presently deployed workload version supports; for example see: https://grafana.com/docs/tempo/latest/configuration/#configure-tempo.",
"title": "Tempo Config",
"title": "Worker Config",
"type": "string"
},
"loki_endpoints": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
"contentMediaType": "application/json",
"contentSchema": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"type": "object"
"type": "string"
},
{
"type": "null"
Expand All @@ -32,6 +40,10 @@
"ca_cert": {
"anyOf": [
{
"contentMediaType": "application/json",
"contentSchema": {
"type": "string"
},
"type": "string"
},
{
Expand All @@ -45,6 +57,10 @@
"server_cert": {
"anyOf": [
{
"contentMediaType": "application/json",
"contentSchema": {
"type": "string"
},
"type": "string"
},
{
Expand All @@ -58,6 +74,10 @@
"privkey_secret_id": {
"anyOf": [
{
"contentMediaType": "application/json",
"contentSchema": {
"type": "string"
},
"type": "string"
},
{
Expand All @@ -68,13 +88,40 @@
"description": "Private key used by the coordinator, for tls encryption.",
"title": "Privkey Secret Id"
},
"remote_write_endpoints": {
"anyOf": [
{
"contentMediaType": "application/json",
"contentSchema": {
"items": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"type": "array"
},
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Endpoints to which the workload (and the worker charm) can push metrics to.",
"title": "Remote Write Endpoints"
},
"tempo_receiver": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
"contentMediaType": "application/json",
"contentSchema": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"type": "object"
"type": "string"
},
{
"type": "null"
Expand All @@ -86,7 +133,7 @@
}
},
"required": [
"tempo_config"
"worker_config"
],
"title": "TempoClusterProviderAppData",
"type": "object"
Expand Down
Loading

0 comments on commit 1bcc5d1

Please sign in to comment.