diff --git a/deploy/kind/e2e/e2e-batch.yaml b/deploy/kind/e2e/e2e-batch.yaml index a6224974..8145408e 100644 --- a/deploy/kind/e2e/e2e-batch.yaml +++ b/deploy/kind/e2e/e2e-batch.yaml @@ -13,7 +13,7 @@ spec: - "-c" - | echo "Waiting for kessel-inventory-service to be ready..." - while ! curl -s http://kessel-inventory-service/api/inventory/v1/readyz; do + while ! curl -s http://kessel-inventory-service:8081/api/inventory/v1/readyz; do echo "Inventory service not ready yet. Sleeping for 5 seconds..." sleep 5 done @@ -23,7 +23,7 @@ spec: image: localhost/inventory-e2e-tests:e2e-test env: - name: INV_HTTP_URL - value: "kessel-inventory-service:80" + value: "kessel-inventory-service:8081" - name: KAFKA_BOOTSTRAP_SERVERS value: "localhost:9092" command: ["/usr/local/bin/e2e-inventory-tests", "-test.v"] diff --git a/deploy/kind/inventory/kessel-inventory.yaml b/deploy/kind/inventory/kessel-inventory.yaml index a40756fc..f725a822 100644 --- a/deploy/kind/inventory/kessel-inventory.yaml +++ b/deploy/kind/inventory/kessel-inventory.yaml @@ -108,7 +108,7 @@ spec: app: kessel-inventory ports: - protocol: TCP - port: 80 + port: 8081 targetPort: 8081 --- # PodDisruptionBudget diff --git a/scripts/start-inventory-kind.sh b/scripts/start-inventory-kind.sh index 552a7a16..060efdb2 100755 --- a/scripts/start-inventory-kind.sh +++ b/scripts/start-inventory-kind.sh @@ -41,7 +41,6 @@ kubectl apply -f deploy/kind/inventory/kessel-inventory.yaml kubectl apply -f deploy/kind/inventory/invdatabase.yaml kubectl apply -f deploy/kind/inventory/strimzi.yaml -kubectl apply -f deploy/kind/relations/spicedb-kind-setup/bundle.yaml kubectl apply -f https://projectcontour.io/quickstart/contour.yaml kubectl get crd httpproxies.projectcontour.io @@ -53,12 +52,12 @@ kubectl create configmap spicedb-schema --from-file=deploy/schema.zed kubectl apply -f deploy/kind/relations/spicedb-kind-setup/postgres/secret.yaml kubectl apply -f deploy/kind/relations/spicedb-kind-setup/postgres/postgresql.yaml kubectl apply -f deploy/kind/relations/spicedb-kind-setup/postgres/storage.yaml +kubectl apply -f deploy/kind/relations/spicedb-kind-setup/bundle.yaml kubectl apply -f deploy/kind/relations/spicedb-kind-setup/spicedb-cr.yaml kubectl apply -f deploy/kind/relations/spicedb-kind-setup/svc-ingress.yaml kubectl apply -f deploy/kind/relations/spicedb-kind-setup/relations-api/secret.yaml kubectl apply -f deploy/kind/relations/spicedb-kind-setup/relations-api/deployment.yaml kubectl apply -f deploy/kind/relations/spicedb-kind-setup/relations-api/svc.yaml - kubectl apply -f deploy/kind/e2e/e2e-batch.yaml -echo "Setup complete. Inventory API, Relations-API, and SpiceDB are running!" \ No newline at end of file +echo "Setup complete." \ No newline at end of file diff --git a/test/e2e/inventory_http_test.go b/test/e2e/inventory_http_test.go index 476a41b9..4087a1c8 100644 --- a/test/e2e/inventory_http_test.go +++ b/test/e2e/inventory_http_test.go @@ -156,14 +156,14 @@ func TestInventoryAPIHTTP_RHELHostLifecycle(t *testing.T) { RhelHost: &resources.RhelHost{ Metadata: &resources.Metadata{ ResourceType: "rhel_host", - WorkspaceId: "workspace", + WorkspaceId: "workspace6", OrgId: "", }, ReporterData: &resources.ReporterData{ ReporterInstanceId: "user@example.com", ReporterType: resources.ReporterData_ACM, - ConsoleHref: "www.example.com", - ApiHref: "www.example.com", + ConsoleHref: "www.exampleConsole.com", + ApiHref: "www.exampleAPI.com", LocalResourceId: "0123", ReporterVersion: "0.1", }, @@ -176,8 +176,8 @@ func TestInventoryAPIHTTP_RHELHostLifecycle(t *testing.T) { ReporterData: &resources.ReporterData{ ReporterInstanceId: "user@example.com", ReporterType: resources.ReporterData_ACM, - ConsoleHref: "www.example.com", - ApiHref: "www.example.com", + ConsoleHref: "www.exampleConsole.com", + ApiHref: "www.exampleAPI.com", LocalResourceId: "0123", ReporterVersion: "0.1", }, @@ -243,25 +243,25 @@ func TestInventoryAPIHTTP_K8SClusterLifecycle(t *testing.T) { K8SCluster: &resources.K8SCluster{ Metadata: &resources.Metadata{ ResourceType: "k8s_cluster", - WorkspaceId: "workspace1", + WorkspaceId: "workspace7", OrgId: "", }, ResourceData: &resources.K8SClusterDetail{ ExternalClusterId: "01234", - ClusterStatus: resources.K8SClusterDetail_READY, + ClusterStatus: resources.K8SClusterDetail_OFFLINE, KubeVersion: "1.31", KubeVendor: resources.K8SClusterDetail_OPENSHIFT, VendorVersion: "4.16", CloudPlatform: resources.K8SClusterDetail_AWS_UPI, Nodes: []*resources.K8SClusterDetailNodesInner{ { - Name: "www.web.com", + Name: "www.website.com", Cpu: "7500m", Memory: "30973224Ki", Labels: []*resources.ResourceLabel{ { - Key: "has_monster_gpu", - Value: "no", + Key: "has_a_monster_gpu", + Value: "yes", }, }, }, @@ -310,7 +310,7 @@ func TestInventoryAPIHTTP_K8SPolicyLifecycle(t *testing.T) { K8SPolicy: &resources.K8SPolicy{ Metadata: &resources.Metadata{ ResourceType: "k8s_policy", - WorkspaceId: "workspace2", + WorkspaceId: "workspace8", OrgId: "", }, ResourceData: &resources.K8SPolicyDetail{