Skip to content

Commit

Permalink
changed inventory to port 8081, updated test file
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam0Brien committed Nov 20, 2024
1 parent 7228bf1 commit 230e5a5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions deploy/kind/e2e/e2e-batch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion deploy/kind/inventory/kessel-inventory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ spec:
app: kessel-inventory
ports:
- protocol: TCP
port: 80
port: 8081
targetPort: 8081
---
# PodDisruptionBudget
Expand Down
5 changes: 2 additions & 3 deletions scripts/start-inventory-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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!"
echo "Setup complete."
22 changes: 11 additions & 11 deletions test/e2e/inventory_http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: "[email protected]",
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",
},
Expand All @@ -176,8 +176,8 @@ func TestInventoryAPIHTTP_RHELHostLifecycle(t *testing.T) {
ReporterData: &resources.ReporterData{
ReporterInstanceId: "[email protected]",
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",
},
Expand Down Expand Up @@ -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",
},
},
},
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 230e5a5

Please sign in to comment.