mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Add: JSON marshal error failure checking; Fix: formatting
This commit is contained in:
parent
232da60430
commit
9ed55bc520
@ -17,11 +17,11 @@ limitations under the License.
|
||||
package apimachinery
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
"encoding/json"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
@ -259,9 +259,10 @@ var _ = SIGDescribe("Namespaces [Serial]", func() {
|
||||
ginkgo.By("patching the Namespace")
|
||||
nspatch, err := json.Marshal(map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
"labels": map[string]string{"testLabel":"testValue"},
|
||||
"labels": map[string]string{"testLabel": "testValue"},
|
||||
},
|
||||
})
|
||||
framework.ExpectNoError(err, "failed to marshal JSON patch data")
|
||||
_, err = f.ClientSet.CoreV1().Namespaces().Patch(namespaceName, types.StrategicMergePatchType, []byte(nspatch))
|
||||
framework.ExpectNoError(err, "failed to patch Namespace")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user