INNER CODE UNIT · Go

converters

k8gb-io/k8gb · controllers/conversion_k8gbio_test.go:48

	converters := map[string]func(*k8gbv1beta1.Gslb) *k8gbv1beta1io.Gslb{
		"migration": convertGslbLegacyToIO,
		"runtime":   convertGslbLegacyToIORuntime,
	}

	for name, convert := range converters {
		t.Run(name, func(t *testing.T) {
			legacy := &k8gbv1beta1.Gslb{
				ObjectMeta: metav1.ObjectMeta{
					Name:        "demo",
					Namespace:   "default",
					Annotations: map[string]string{"k8gb.io/hostname": "demo.cloud.example.com"},
					Labels:      map[string]string{migrationRequestLabelKey: "true"},
				},
			}

			io := convert(legacy)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…