mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 06:16:08 -04:00
Refactor id file interaction
* Use IP instead of endpoint in clusterIDsFile * Move and rename validateEnpoint to addPortIfMissing * Refactor clusterIDsFile handling in verify cmd
This commit is contained in:
parent
c2faa20d6e
commit
7bbcc564bb
8 changed files with 95 additions and 106 deletions
|
@ -207,14 +207,14 @@ func TestWriteOutput(t *testing.T) {
|
|||
expectedIDFile := clusterIDsFile{
|
||||
ClusterID: clusterID,
|
||||
OwnerID: ownerID,
|
||||
Endpoint: net.JoinHostPort("ip", strconv.Itoa(constants.VerifyServiceNodePortGRPC)),
|
||||
IP: "cluster-ip",
|
||||
}
|
||||
|
||||
var out bytes.Buffer
|
||||
testFs := afero.NewMemMapFs()
|
||||
fileHandler := file.NewHandler(testFs)
|
||||
|
||||
err := writeOutput(resp, "ip", &out, fileHandler)
|
||||
err := writeOutput(resp, "cluster-ip", &out, fileHandler)
|
||||
assert.NoError(err)
|
||||
// assert.Contains(out.String(), ownerID)
|
||||
assert.Contains(out.String(), clusterID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue