Skip to content

Commit

Permalink
Update the license control service tests to not panic
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Mundrawala <[email protected]>
  • Loading branch information
Jay Mundrawala committed Feb 8, 2021
1 parent 8ff135f commit 3840be9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/license-control-service/pkg/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@ func TestAppliedLicense(t *testing.T) {
}

srv := testLicenseControlServer(t)
srv.Update(context.Background(), &lc.UpdateRequest{LicenseData: string(validLicenseData)})
_, err := srv.Update(context.Background(), &lc.UpdateRequest{LicenseData: string(validLicenseData)})
require.NoError(t, err)

t.Run("License() with a valid license applied", func(t *testing.T) {
res, err := srv.License(
context.Background(),
&lc.LicenseRequest{},
)
require.NoError(t, err)
require.NotNil(t, res.GetLicense())
assert.NotNil(t, res.License.Id, "License should include a license ID")
assert.Equal(t, "44c6e9d1-98f6-4b4a-857f-d15da015f05f", res.License.CustomerId, "License should be valid")
})
Expand Down

0 comments on commit 3840be9

Please sign in to comment.