Skip to content

Commit

Permalink
Merge pull request #346 from cloudfoundry/fix-github-action
Browse files Browse the repository at this point in the history
Fix bootstrap unit tests and run tests for pull requests
  • Loading branch information
jpalermo authored Jan 16, 2025
2 parents e03a736 + d8dab69 commit 3460018
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
name: go
on:
push:
pull_request:
on: [push, pull_request]
jobs:
lint: # <- name
strategy:
Expand Down
5 changes: 4 additions & 1 deletion agent/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,7 @@ var _ = Describe("bootstrap", func() {
fakesys.FakeCmdResult{Stdout: "/dev/vda1"},
)

logger = boshlog.NewLogger(boshlog.LevelNone)
udev := boshudev.NewConcreteUdevDevice(runner, logger)
linuxCdrom := boshcdrom.NewLinuxCdrom("/dev/sr0", udev, runner)
linuxCdutil := boshcdrom.NewCdUtil(dirProvider.SettingsDir(), fs, linuxCdrom, logger)
Expand All @@ -1117,7 +1118,6 @@ var _ = Describe("bootstrap", func() {
interfaceConfigurationCreator := boshnet.NewInterfaceConfigurationCreator(logger)

interfaceAddrsProvider = &fakeip.FakeInterfaceAddressesProvider{}
logger = boshlog.NewLogger(boshlog.LevelNone)
kernelIPv6 := boshnet.NewKernelIPv6Impl(fs, runner, logger)
fakeMACAddressDetector = &netfakes.FakeMACAddressDetector{}
err := fs.WriteFileString("/etc/resolv.conf", "8.8.8.8 4.4.4.4")
Expand Down Expand Up @@ -1318,6 +1318,9 @@ var _ = Describe("bootstrap", func() {
Context("and a single physical network interface exists", func() {
BeforeEach(func() {
stubInterfaces([][]string{{"eth0", "aa:bb:cc"}})
interfaceAddrsProvider.GetInterfaceAddresses = []boship.InterfaceAddress{
boship.NewSimpleInterfaceAddress("eth0", "2.2.2.2"),
}
})

It("succeeds", func() {
Expand Down

0 comments on commit 3460018

Please sign in to comment.