Skip to content

Smoke test script fails due to missing function in tracker.sh #55

@rklonner

Description

@rklonner

What's broken?

The smoke test script fails due to a missing function named track_smoketest_completed() in tracker.sh.

However, the function is available in tracker-legacy.sh

A workaround is to add the function from tracker-legacy.sh to tracker.sh, afterwards the smoke test runs successfully.

If the workaround is the solution I would like to contribute or get guidance for a cleaner solution.

Steps to reproduce

  1. Open codespace for adventure 01 - Beginner
  2. Solve the task by overwriting adventures/01-echoes-lost-in-orbit/beginner/manifests/appset.yaml with
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: echo-server
  namespace: argocd
spec:
  generators:
    - git:
        repoURL: https://github.com/off-on-dev/open-source-challenges.git
        revision: HEAD
        directories:
          - path: adventures/01-echoes-lost-in-orbit/beginner/manifests/overlays/*
  template:
    metadata:
      name: echo-server-{{path.basename}}
      labels:
        app.kubernetes.io/managed-by: argocd
    spec:
      project: default
      source:
        repoURL: https://github.com/off-on-dev/open-source-challenges.git
        targetRevision: HEAD
        path: adventures/01-echoes-lost-in-orbit/beginner/manifests/overlays/{{path.basename}}
      destination:
        server: https://kubernetes.default.svc
        namespace: echo-{{path.basename}}
      syncPolicy:
        automated:
          selfHeal: true
          prune: true
        syncOptions:
          - CreateNamespace=true
  1. Apply the solution kubectl apply -n argocd -f adventures/01-echoes-lost-in-orbit/beginner/manifests/appset.yaml
  2. Execute smoke test: adventures/01-echoes-lost-in-orbit/beginner/smoke-test.sh

Full output:

╔════════════════════════════════════════════════════════════╗
║ ║
║ Challenge 01: Echoes Lost in Orbit ║
║ Level 1: Broken Echoes ║
║ Smoke Test Verification ║
║ ║
╚════════════════════════════════════════════════════════════╝

Checking prerequisites...
✓ All prerequisites met

Running smoke tests...

🔬 Checking Staging Environment
✓ Namespace 'echo-staging' exists
✓ Service echo-server-staging in 'echo-staging' exists
⏳ HTTP GET http://localhost:8081/healthz...
✓ App is reachable at http://localhost:8081/healthz and returned expected content

✅ Staging is healthy!

🔬 Checking Production Environment
✓ Namespace 'echo-prod' exists
✓ Service echo-server-prod in 'echo-prod' exists
⏳ HTTP GET http://localhost:8082/healthz...
✓ App is reachable at http://localhost:8082/healthz and returned expected content

✅ Production is healthy!

╔════════════════════════════════════════════════════════════╗
║ ║
║ Test Results Summary ║
║ ║
╚════════════════════════════════════════════════════════════╝

/workspaces/open-source-challenges/lib/scripts/output.sh: line 100: track_smoketest_completed: command not found

Error:
/workspaces/open-source-challenges/lib/scripts/output.sh: line 100: track_smoketest_completed: command not found

Expected behavior

The script should pass and print a success message

Where?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions