Skip to content

Commit

Permalink
F-93: Packer script rm source code and go test case
Browse files Browse the repository at this point in the history
Signed-off-by: Jaime <[email protected]>
  • Loading branch information
jaimecb committed Nov 29, 2024
1 parent 367f499 commit 5bff324
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,33 +380,18 @@ func TestSetupRange(t *testing.T) {
{
name: "Extend expired IP lease with no MAC2IP (192.168.1.5)",
args: []string{
"test_leases.db", // filename
"192.168.1.1", // start IP
"192.168.1.7", // end IP
"60s", // lease time
"--excluded-ips", "192.168.1.3,192.168.1.4", // excluded IPs
"test_leases.db", // filename
"192.168.1.1", // start IP
"192.168.1.7", // end IP
"60s", // lease time
"--excluded-ips", "192.168.1.255", // try to exclude out of range IP
},
expectedLeaseTime: 60 * time.Second,
reqMACAddr: net.HardwareAddr{0x02, 0x00, 0xc0, 0xa8, 0x01, 0x27},
expectedIP: net.ParseIP("192.168.1.5"),
expectSetUpError: false,
expectHandlerError: false,
},
// {
// name: "New MAC get expired IP lease with no MAC2IP (192.168.1.7)",
// args: []string{
// "test_leases.db", // filename
// "192.168.1.1", // start IP
// "192.168.1.7", // end IP
// "60s", // lease time
// "--excluded-ips", "192.168.1.3,192.168.1.4", // excluded IPs
// },
// expectedLeaseTime: 60 * time.Second,
// reqMACAddr: net.HardwareAddr{0x54, 0x01, 0xc0, 0xa8, 0x11, 0x09},
// expectedIP: net.ParseIP("192.168.1.7"),
// expectSetUpError: false,
// expectHandlerError: false,
// },
{
name: "Invalid Number of Arguments",
args: []string{
Expand Down
7 changes: 5 additions & 2 deletions packer/service_VRouter/VRouter.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ build {
}
provisioner "shell" {
inline_shebang = "/bin/bash -e"
environment_vars = [
"COREDHCP_ONELEASE_DIR=/etc/one-appliance/service.d/VRouter/DHCP4v2/coredhcp-onelease",
]
inline = [
"cd /etc/one-appliance/service.d/VRouter/DHCP4v2/coredhcp-onelease",
"CGO_ENABLED=1 GCC=musl-gcc go build",
"CGO_ENABLED=1 GCC=musl-gcc go build -C $COREDHCP_ONELEASE_DIR",
"find $COREDHCP_ONELEASE_DIR \\( -type f ! -name 'coredhcp-onelease' -o -type d -empty \\) -delete",
]
}
provisioner "shell" {
Expand Down

0 comments on commit 5bff324

Please sign in to comment.