mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-12 16:09:39 -05:00
cli: set image version in tests to stamped binary version (#2485)
This commit is contained in:
parent
5cd70ac58a
commit
c3a0a7e156
@ -577,7 +577,7 @@ func TestAttestation(t *testing.T) {
|
|||||||
require.NoError(existingStateFile.WriteToFile(fileHandler, constants.StateFilename))
|
require.NoError(existingStateFile.WriteToFile(fileHandler, constants.StateFilename))
|
||||||
|
|
||||||
cfg := config.Default()
|
cfg := config.Default()
|
||||||
cfg.Image = "v0.0.0" // is the default version of the the CLI (before build injects the real version)
|
cfg.Image = constants.BinaryVersion().String()
|
||||||
cfg.RemoveProviderAndAttestationExcept(cloudprovider.QEMU)
|
cfg.RemoveProviderAndAttestationExcept(cloudprovider.QEMU)
|
||||||
cfg.Attestation.QEMUVTPM.Measurements[0] = measurements.WithAllBytes(0x00, measurements.Enforce, measurements.PCRMeasurementLength)
|
cfg.Attestation.QEMUVTPM.Measurements[0] = measurements.WithAllBytes(0x00, measurements.Enforce, measurements.PCRMeasurementLength)
|
||||||
cfg.Attestation.QEMUVTPM.Measurements[1] = measurements.WithAllBytes(0x11, measurements.Enforce, measurements.PCRMeasurementLength)
|
cfg.Attestation.QEMUVTPM.Measurements[1] = measurements.WithAllBytes(0x11, measurements.Enforce, measurements.PCRMeasurementLength)
|
||||||
@ -611,6 +611,9 @@ func TestAttestation(t *testing.T) {
|
|||||||
assert.Error(err)
|
assert.Error(err)
|
||||||
// make sure the error is actually a TLS handshake error
|
// make sure the error is actually a TLS handshake error
|
||||||
assert.Contains(err.Error(), "transport: authentication handshake failed")
|
assert.Contains(err.Error(), "transport: authentication handshake failed")
|
||||||
|
if validationErr, ok := err.(*config.ValidationError); ok {
|
||||||
|
t.Log(validationErr.LongMessage())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type testValidator struct {
|
type testValidator struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user