2020-05-10 15:06:44 +02:00
|
|
|
package job
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/stretchr/testify/require"
|
2020-08-31 16:04:00 +02:00
|
|
|
|
2020-05-10 15:06:44 +02:00
|
|
|
"github.com/zrepl/zrepl/endpoint"
|
|
|
|
"github.com/zrepl/zrepl/transport"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestFakeActiveSideDirectMethodInvocationClientIdentityDoesNotPassValidityTest(t *testing.T) {
|
|
|
|
jobid, err := endpoint.MakeJobID("validjobname")
|
|
|
|
require.NoError(t, err)
|
|
|
|
clientIdentity := FakeActiveSideDirectMethodInvocationClientIdentity(jobid)
|
|
|
|
t.Logf("%v", clientIdentity)
|
|
|
|
err = transport.ValidateClientIdentity(clientIdentity)
|
|
|
|
assert.Error(t, err)
|
|
|
|
}
|