Skip to content

Commit

Permalink
Local test run
Browse files Browse the repository at this point in the history
  • Loading branch information
kovayur committed Jun 26, 2024
1 parent 49e5fbe commit 785c863
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=cache,target=/go/.cache/ \
make fleet-manager fleetshard-sync GOOS=linux GOARCH=${TARGETARCH}

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 as standard
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 AS standard

RUN microdnf install shadow-utils

Expand Down
1 change: 1 addition & 0 deletions dev/env/scripts/down.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ port-forwarding stop fleet-manager-db 5432 || true

log "Cleanup files..."
make -C "${GITROOT}" undeploy
delete "${MANIFESTS_DIR}/fleetshard-operator" || true
delete "${MANIFESTS_DIR}/fleetshard-sync" || true

log "Cleanup namespaces..."
Expand Down
4 changes: 2 additions & 2 deletions dev/env/scripts/reset
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ log "Resetting state of control-plane and data-plane..."

port-forwarding start fleet-manager 8000 8000
port-forwarding start fleet-manager-db 5432 5432
$KUBECTL -n "$ACSCS_NAMESPACE" exec -it deploy/fleet-manager-db -- psql -h localhost -U "$DATABASE_USER" -p "$DATABASE_PORT" -d "$DATABASE_NAME" -c "DELETE FROM central_requests;"
$KUBECTL -n "$ACSCS_NAMESPACE" exec -it deploy/fleet-manager-db -- psql -h localhost -U "${DATABASE_USER:-ocm}" -p "${DATABASE_PORT:-5432}" -d "${DATABASE_NAME:-fleet-manager}" -c "DELETE FROM central_requests;"
sleep 1

delete_tenant_namespaces
Expand All @@ -21,6 +21,6 @@ $KUBECTL -n "${STACKROX_OPERATOR_NAMESPACE}" delete deploy -l app=rhacs-operator
log "Apply default gitops..."
make -C "${GITROOT}" deploy/gitops

$KUBECTL -n "${ACSCS_NAMESPACE}" delete pod -l application=fleetshard-sync
$KUBECTL -n "${ACSCS_NAMESPACE}" delete pod -l app=fleetshard-sync

log "Resetting complete."
2 changes: 1 addition & 1 deletion dp-terraform/helm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 as build
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 AS build
ENV HOME=/opt/helm
COPY rhacs-terraform ${HOME}/rhacs-terraform
WORKDIR ${HOME}
Expand Down
10 changes: 5 additions & 5 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ var _ = Describe("Central", Ordered, func() {
var notes []string
var ctx = context.Background()

BeforeEach(func() {
Expect(restoreDefaultGitopsConfig()).To(Succeed())
})

BeforeEach(func() {
SkipIf(!runCentralTests, "Skipping Central tests")

Expand Down Expand Up @@ -98,6 +94,10 @@ var _ = Describe("Central", Ordered, func() {
var centralRequestName string
var namespaceName string

BeforeAll(func() {
Expect(restoreDefaultGitopsConfig()).To(Succeed())
})

BeforeAll(func() {
resp, _, err := client.PublicAPI().CreateCentral(ctx, true, public.CentralRequestPayload{
CloudProvider: dpCloudProvider,
Expand Down Expand Up @@ -365,7 +365,7 @@ var _ = Describe("Central", Ordered, func() {
Should(BeEmpty(), "Started at %s", time.Now())
})

It("should restore the default gitops config", func() {
AfterAll(func() {
Expect(restoreDefaultGitopsConfig()).To(Succeed())
})
})
Expand Down

0 comments on commit 785c863

Please sign in to comment.