@opensoha/contracts 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth/catalog_generated.go +2 -2
- package/auth/catalog_test.go +40 -0
- package/auth/permission-catalog.json +227 -3
- package/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
- package/fixtures/openapi/AISkillsSettingsEnvelope/invalid/missing-registry.json +3 -0
- package/fixtures/openapi/AISkillsSettingsEnvelope/valid/registry.json +13 -0
- package/fixtures/openapi/AlertEventStreamSignal/invalid/missing-observed-at.json +4 -0
- package/fixtures/openapi/AlertEventStreamSignal/valid/changed.json +9 -0
- package/fixtures/openapi/ComputeOverviewEnvelope/valid/partial.json +6 -0
- package/fixtures/openapi/ComputeTaskListEnvelope/invalid/progress-overflow.json +21 -0
- package/fixtures/openapi/ComputeTaskListEnvelope/valid/running.json +15 -0
- package/fixtures/openapi/ComputeTaskStreamEvent/invalid/missing-observed-at.json +3 -0
- package/fixtures/openapi/ComputeTaskStreamEvent/valid/snapshot.json +27 -0
- package/fixtures/openapi/KubernetesResourceGraphEnvelope/invalid/edge-without-target.json +16 -0
- package/fixtures/openapi/KubernetesResourceGraphEnvelope/valid/deployment.json +53 -0
- package/fixtures/openapi/KubernetesResourceSearchEnvelope/invalid/missing-resource.json +10 -0
- package/fixtures/openapi/KubernetesResourceSearchEnvelope/valid/mixed.json +29 -0
- package/fixtures/openapi/KubernetesResourceStreamEvent/invalid/missing-observed-at.json +5 -0
- package/fixtures/openapi/KubernetesResourceStreamEvent/valid/modified.json +18 -0
- package/fixtures/openapi/KubernetesSecurityPostureEnvelope/invalid/finding-without-severity.json +24 -0
- package/fixtures/openapi/KubernetesSecurityPostureEnvelope/valid/kubescape.json +34 -0
- package/fixtures/openapi/KubernetesService/invalid/node-port-out-of-range.json +14 -0
- package/fixtures/openapi/KubernetesService/valid/port-mappings.json +22 -0
- package/fixtures/openapi/KubernetesServiceDetail/invalid/empty-target-port.json +13 -0
- package/fixtures/openapi/KubernetesServiceDetail/valid/port-mappings.json +22 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/invalid/unknown-inheritance.json +9 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/valid/selective-job.json +9 -0
- package/fixtures/openapi/OperationalPlanEnvelope/invalid/kubernetes-owner-without-manager.json +29 -0
- package/fixtures/openapi/OperationalPlanEnvelope/valid/kubernetes-resource-update.json +30 -0
- package/fixtures/openapi/WorkbenchAgentRunListEnvelope/invalid/callback-token.json +17 -0
- package/fixtures/openapi/WorkbenchAgentRunListEnvelope/valid/session-scoped.json +17 -0
- package/fixtures/openapi/WorkbenchSessionEnvelope/invalid/missing-owner.json +8 -0
- package/fixtures/openapi/WorkbenchSessionEnvelope/valid/current.json +17 -0
- package/gen/go/sohaapi/client.go +1 -1
- package/gen/go/sohaapi/types.go +1758 -59
- package/gen/go/sohaapi/types_test.go +43 -2
- package/gen/ts/sohaapi/index.ts +12853 -9909
- package/openapi/soha-api.json +11360 -5927
- package/openapi/soha-api.yaml +11122 -8646
- package/openapi/spec_generated.go +3 -3
- package/package.json +1 -1
- package/resource/models.go +197 -0
|
@@ -9,9 +9,50 @@ func TestKubernetesWorkloadSnapshotRequestGeneratedShape(t *testing.T) {
|
|
|
9
9
|
SourceName: "reports",
|
|
10
10
|
TargetKind: KubernetesWorkloadSnapshotTargetKindCronJob,
|
|
11
11
|
TargetName: "reports-schedule",
|
|
12
|
+
Inherit: []KubernetesWorkloadSnapshotInheritance{KubernetesWorkloadSnapshotInheritanceEnvironment},
|
|
12
13
|
RestartPolicy: KubernetesWorkloadSnapshotRestartPolicyNever,
|
|
13
14
|
}
|
|
14
|
-
if request.Namespace != "default" {
|
|
15
|
-
t.Fatalf("
|
|
15
|
+
if request.Namespace != "default" || len(request.Inherit) != 1 {
|
|
16
|
+
t.Fatalf("request = %#v", request)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
func TestWorkbenchMessageDoneEventRoleGeneratedName(t *testing.T) {
|
|
21
|
+
if WorkbenchMessageDoneEventRoleAssistant != WorkbenchMessageDoneEventRole("assistant") {
|
|
22
|
+
t.Fatalf("role = %q", WorkbenchMessageDoneEventRoleAssistant)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
func TestKubernetesResourceSearchGeneratedShape(t *testing.T) {
|
|
27
|
+
result := KubernetesResourceSearchResult{
|
|
28
|
+
Items: []KubernetesResourceSearchItem{
|
|
29
|
+
{
|
|
30
|
+
Resource: KubernetesResourceRef{
|
|
31
|
+
APIVersion: "v1",
|
|
32
|
+
ClusterID: "cluster-a",
|
|
33
|
+
Kind: "Pod",
|
|
34
|
+
Name: "api-0",
|
|
35
|
+
Namespace: "production",
|
|
36
|
+
ScopeMode: KubernetesResourceScopeModeNamespace,
|
|
37
|
+
},
|
|
38
|
+
Status: "Running",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
Truncated: false,
|
|
42
|
+
}
|
|
43
|
+
if len(result.Items) != 1 || result.Items[0].Resource.Name != "api-0" {
|
|
44
|
+
t.Fatalf("result = %#v", result)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
func TestLegacyEnumAliasesRemainSourceCompatible(t *testing.T) {
|
|
49
|
+
if TCP != DockerContainerPortInputProtocolTCP || UDP != DockerContainerPortInputProtocolUDP {
|
|
50
|
+
t.Fatalf("docker protocol aliases = %q/%q", TCP, UDP)
|
|
51
|
+
}
|
|
52
|
+
if Critical != MarketplaceAdvisorySeverityCritical ||
|
|
53
|
+
High != MarketplaceAdvisorySeverityHigh ||
|
|
54
|
+
Medium != MarketplaceAdvisorySeverityMedium ||
|
|
55
|
+
Low != MarketplaceAdvisorySeverityLow {
|
|
56
|
+
t.Fatalf("marketplace severity aliases = %q/%q/%q/%q", Critical, High, Medium, Low)
|
|
16
57
|
}
|
|
17
58
|
}
|