Skip to content

Commit c3efa9e

Browse files
committed
remove old test
Tailscale changed the config file hash annotation and this test is not needed anymore (https://github.com/tailscale/tailscale/commit/52f88f782a45652d9db25b1563e5defae1e42897\#diff-81d42590a1f8c9d4b6e8b2c898e364cadb84bfb45774aeb01ce9a789983ae04a). It was a left over from rebasing.
1 parent c966f6f commit c3efa9e

File tree

1 file changed

+0
-65
lines changed

1 file changed

+0
-65
lines changed

cmd/k8s-operator/operator_test.go

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,71 +1339,6 @@ func TestProxyFirewallMode(t *testing.T) {
13391339
expectEqual(t, fc, expectedSTS(t, fc, o), removeHashAnnotation, removeResourceReqs)
13401340
}
13411341

1342-
func TestTailscaledConfigfileHash(t *testing.T) {
1343-
fc := fake.NewFakeClient()
1344-
ft := &fakeTSClient{}
1345-
zl, err := zap.NewDevelopment()
1346-
if err != nil {
1347-
t.Fatal(err)
1348-
}
1349-
clock := tstest.NewClock(tstest.ClockOpts{})
1350-
sr := &ServiceReconciler{
1351-
Client: fc,
1352-
ssr: &tailscaleSTSReconciler{
1353-
Client: fc,
1354-
tsClient: ft,
1355-
defaultTags: []string{"tag:k8s"},
1356-
operatorNamespace: "operator-ns",
1357-
proxyImage: "tailscale/tailscale",
1358-
},
1359-
logger: zl.Sugar(),
1360-
clock: clock,
1361-
isDefaultLoadBalancer: true,
1362-
}
1363-
1364-
// Create a service that we should manage, and check that the initial round
1365-
// of objects looks right.
1366-
mustCreate(t, fc, &corev1.Service{
1367-
ObjectMeta: metav1.ObjectMeta{
1368-
Name: "test",
1369-
Namespace: "default",
1370-
// The apiserver is supposed to set the UID, but the fake client
1371-
// doesn't. So, set it explicitly because other code later depends
1372-
// on it being set.
1373-
UID: types.UID("1234-UID"),
1374-
},
1375-
Spec: corev1.ServiceSpec{
1376-
ClusterIP: "10.20.30.40",
1377-
Type: corev1.ServiceTypeLoadBalancer,
1378-
},
1379-
})
1380-
1381-
expectReconciled(t, sr, "default", "test")
1382-
1383-
fullName, shortName := findGenName(t, fc, "default", "test", "svc")
1384-
o := configOpts{
1385-
stsName: shortName,
1386-
secretName: fullName,
1387-
namespace: "default",
1388-
parentType: "svc",
1389-
hostname: "default-test",
1390-
clusterTargetIP: "10.20.30.40",
1391-
confFileHash: "848bff4b5ba83ac999e6984c8464e597156daba961ae045e7dbaef606d54ab5e",
1392-
app: kubetypes.AppIngressProxy,
1393-
}
1394-
expectEqual(t, fc, expectedSTS(t, fc, o), removeResourceReqs)
1395-
1396-
// 2. Hostname gets changed, configfile is updated and a new hash value
1397-
// is produced.
1398-
mustUpdate(t, fc, "default", "test", func(svc *corev1.Service) {
1399-
mak.Set(&svc.Annotations, AnnotationHostname, "another-test")
1400-
})
1401-
o.hostname = "another-test"
1402-
o.confFileHash = "d4cc13f09f55f4f6775689004f9a466723325b84d2b590692796bfe22aeaa389"
1403-
expectReconciled(t, sr, "default", "test")
1404-
expectEqual(t, fc, expectedSTS(t, fc, o), removeResourceReqs)
1405-
}
1406-
14071342
func Test_isMagicDNSName(t *testing.T) {
14081343
tests := []struct {
14091344
in string

0 commit comments

Comments
 (0)