diff --git a/group_test.go b/group_test.go index 50bc65f0..674ac2a8 100644 --- a/group_test.go +++ b/group_test.go @@ -495,19 +495,19 @@ func TestUpdateNetwork(t *testing.T) { assert.Nil(t, err, err) assert.Equal(t, network.DefaultPostUp, returnedNetwork.DefaultPostUp) }) - t.Run("UpdatePreUP", func(t *testing.T) { + t.Run("UpdatePostDown", func(t *testing.T) { type Network struct { - DefaultPreUp string + DefaultPostDown string } var network Network - network.DefaultPreUp = "test string" + network.DefaultPostDown = "test string" response, err := api(t, network, http.MethodPut, "http://localhost:8081/api/networks/skynet", "secretkey") assert.Nil(t, err, err) assert.Equal(t, http.StatusOK, response.StatusCode) defer response.Body.Close() err = json.NewDecoder(response.Body).Decode(&returnedNetwork) assert.Nil(t, err, err) - assert.Equal(t, network.DefaultPreUp, returnedNetwork.DefaultPreUp) + assert.Equal(t, network.DefaultPostDown, returnedNetwork.DefaultPostDown) }) t.Run("UpdateKeepAlive", func(t *testing.T) { type Network struct { diff --git a/test/group_test.go b/test/group_test.go index 68699ad0..1b81dc1d 100644 --- a/test/group_test.go +++ b/test/group_test.go @@ -523,7 +523,7 @@ func TestUpdatenetwork(t *testing.T) { assert.Nil(t, err, err) assert.Equal(t, network.DefaultPostUp, returnedNetwork.DefaultPostUp) }) - t.Run("UpdatePreUp", func(t *testing.T) { + t.Run("UpdatePostDown", func(t *testing.T) { // -------needs fixing ------ // mismatch in models.Network between struc name and json/bson name // does not get updated.