Skip to content

Commit 971a624

Browse files
neddparamprice
authored andcommitted
Remove CentOS platform support
CentOS stemcells have been removed upstream, so this cleans up the remaining CentOS-specific code from the agent: - Delete platform/net/centos_net_manager.go and its tests - Remove NewCentOSCertManager from platform/cert/cert_manager.go - Remove CentOS test context from cert_manager_test.go - Remove centos platform entry from platform/provider.go - Clean up CentOS mention in routes_searcher comment Fixes #339
1 parent ef6e739 commit 971a624

6 files changed

Lines changed: 0 additions & 1148 deletions

File tree

platform/cert/cert_manager.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,6 @@ func NewUbuntuCertManager(fs boshsys.FileSystem, runner boshsys.CmdRunner, timeo
5959
}
6060
}
6161

62-
func NewCentOSCertManager(fs boshsys.FileSystem, runner boshsys.CmdRunner, timeout time.Duration, logger logger.Logger) Manager {
63-
return &certManager{
64-
fs: fs,
65-
runner: runner,
66-
path: "/etc/pki/ca-trust/source/anchors/",
67-
updateCmdPath: "/usr/bin/update-ca-trust",
68-
logger: logger,
69-
logTag: "CentOSCertManager",
70-
updateTimeout: timeout,
71-
}
72-
}
73-
7462
func NewDummyCertManager(fs boshsys.FileSystem, runner boshsys.CmdRunner, timeout time.Duration, logger logger.Logger) Manager {
7563
return &certManager{
7664
fs: fs,

platform/cert/cert_manager_test.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -339,36 +339,6 @@ var _ = Describe("Certificate Management", func() {
339339
})
340340
})
341341

342-
Context("CentOS", func() {
343-
BeforeEach(func() {
344-
fakeFs = fakesys.NewFakeFileSystem()
345-
fakeCmdRunner = fakesys.NewFakeCmdRunner()
346-
fakeCmdRunner.AddCmdResult("/usr/bin/update-ca-trust", fakesys.FakeCmdResult{
347-
Stdout: "",
348-
Stderr: "",
349-
ExitStatus: 0,
350-
Sticky: true,
351-
})
352-
certManager = cert.NewCentOSCertManager(fakeFs, fakeCmdRunner, 0, log)
353-
})
354-
355-
SharedLinuxCertManagerExamples("/etc/pki/ca-trust/source/anchors", "/usr/bin/update-ca-trust")
356-
357-
It("executes update cert command", func() {
358-
fakeCmdRunner = fakesys.NewFakeCmdRunner()
359-
fakeCmdRunner.AddCmdResult("/usr/bin/update-ca-trust", fakesys.FakeCmdResult{
360-
Stdout: "",
361-
Stderr: "",
362-
ExitStatus: 2,
363-
Error: errors.New("command failed"),
364-
})
365-
certManager = cert.NewCentOSCertManager(fakeFs, fakeCmdRunner, 0, log)
366-
367-
err := certManager.UpdateCertificates(cert1)
368-
Expect(err).To(HaveOccurred())
369-
})
370-
})
371-
372342
Context("Windows", func() {
373343
const validCerts string = `-----BEGIN CERTIFICATE-----
374344
MIIC0jCCAboCCQCuQJScK+G0WzANBgkqhkiG9w0BAQsFADArMQswCQYDVQQGEwJV

0 commit comments

Comments
 (0)