Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce VPP integration tests #75

Merged
merged 9 commits into from Oct 28, 2022
Merged

Introduce VPP integration tests #75

merged 9 commits into from Oct 28, 2022

Conversation

ondrej-fabry
Copy link
Member

@ondrej-fabry ondrej-fabry commented Oct 20, 2022

This PR adds another GitHub Workflow test.yaml for executing tests against a running VPP instance. The tests run against 3 latest releases of VPP, 22.10, 22.06, 22.02, installed from the official debian package published by FD.io to packagecloud.

All the testing against a running VPP instance are located under test/integration. The test/vpptesting package provides a dead simple way to setup fresh VPP instance and is used in all tests. The tests are written as traditional Go unit test. There are few basic test cases included in this PR:

  • TestExamples - runs all the GoVPP examples
  • TestVersion - checks if the version retrieved via binary API is non-empty:
    func TestVersion(t *testing.T) {
    test := vpptesting.SetupVPP(t)
    vpeRPC := vpe.NewServiceClient(test.Conn)
    versionInfo, err := vpeRPC.ShowVersion(context.Background(), &vpe.ShowVersion{})
    if err != nil {
    t.Fatalf("getting version failed: %v", err)
    }
    t.Logf("VPP version: %v", versionInfo.Version)
    if versionInfo.Version == "" {
    t.Fatal("expected VPP version to not be empty")
    }
    }
  • TestStatClient* - runs all stats client methods

You can run the integration tests by running:

# Run against latest released VPP version
make test-integration

# Run against VPP 22.10 (stable/2210 branch)
make test-integration VPP_REPO=2210

# Run against VPP development version (master branch)
make test-integration VPP_REPO=master

Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
# Conflicts:
#	.github/workflows/ci.yaml
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
@ondrej-fabry ondrej-fabry requested review from VladoLavor and removed request for VladoLavor October 24, 2022 08:07
@ondrej-fabry ondrej-fabry added the ci Continous Integration label Oct 24, 2022
@ondrej-fabry ondrej-fabry added this to the v0.7.0 milestone Oct 24, 2022
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
examples/multi-vpp/multi_vpp.go Show resolved Hide resolved
@ondrej-fabry ondrej-fabry merged commit 3ed0937 into master Oct 28, 2022
@ondrej-fabry ondrej-fabry deleted the integration branch October 28, 2022 07:35
@ondrej-fabry ondrej-fabry mentioned this pull request Nov 3, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants