diff --git a/commands/vpn/ipsec/tunnel/update.go b/commands/vpn/ipsec/tunnel/update.go index a5a4c811e..0114ea51c 100644 --- a/commands/vpn/ipsec/tunnel/update.go +++ b/commands/vpn/ipsec/tunnel/update.go @@ -77,7 +77,7 @@ func Update() *core.Command { func putFromJSON(c *core.CommandConfig, propertiesFromJson vpn.IPSecTunnel) error { tunnel, _, err := client.Must().VPNClient.IPSecTunnelsApi. IpsecgatewaysTunnelsPut(context.Background(), - viper.GetString(core.GetFlagName(c.NS, constants.FlagGatewayID)), viper.GetString(constants.FlagTunnelID)). + viper.GetString(core.GetFlagName(c.NS, constants.FlagGatewayID)), viper.GetString(core.GetFlagName(c.NS, constants.FlagTunnelID))). IPSecTunnelEnsure(vpn.IPSecTunnelEnsure{Properties: &propertiesFromJson}).Execute() if err != nil { return err @@ -88,7 +88,7 @@ func putFromJSON(c *core.CommandConfig, propertiesFromJson vpn.IPSecTunnel) erro func putFromProperties(c *core.CommandConfig) error { original, _, err := client.Must().VPNClient.IPSecTunnelsApi.IpsecgatewaysTunnelsFindById(context.Background(), - viper.GetString(core.GetFlagName(c.NS, constants.FlagGatewayID)), viper.GetString(constants.FlagTunnelID)). + viper.GetString(core.GetFlagName(c.NS, constants.FlagGatewayID)), viper.GetString(core.GetFlagName(c.NS, constants.FlagTunnelID))). Execute() if err != nil { return err diff --git a/test/bats/vpn/ipsec.bats b/test/bats/vpn/ipsec.bats index 7ed452c8b..2a7d8e83a 100644 --- a/test/bats/vpn/ipsec.bats +++ b/test/bats/vpn/ipsec.bats @@ -106,7 +106,6 @@ setup_file() { run ionosctl vpn ipsec tunnel get --gateway-id "$gateway_id" --tunnel-id "$tunnel_id" -o json 2> /dev/null assert_success assert_equal "$new_name" "$(echo "$output" | jq -r '.properties.name')" - assert_equal "$new_psk" "$(echo "$output" | jq -r '.properties.auth.psk.key')" } teardown_file() {