Skip to content

Commit

Permalink
update UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanthvn committed Jun 14, 2024
1 parent 833b812 commit 2600200
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/elfparser/elf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func TestLoad(t *testing.T) {
elfFile, err := elf.NewFile(f)
assert.NoError(t, err)
elfLoader := newElfLoader(elfFile, m.ebpf_maps, m.ebpf_progs, "test")
loadedProgs, loadedMaps, err := elfLoader.doLoadELF()
loadedProgs, loadedMaps, err := elfLoader.doLoadELF(BpfCustomData{})
assert.NoError(t, err)
assert.Equal(t, tt.wantProg, len(loadedProgs))
assert.Equal(t, tt.wantMap, len(loadedMaps))
Expand Down Expand Up @@ -334,7 +334,7 @@ func TestParseMap(t *testing.T) {

err = elfLoader.parseSection()
assert.NoError(t, err)
mapData, err := elfLoader.parseMap()
mapData, err := elfLoader.parseMap(BpfCustomData{})
if tt.wantErr != nil {
assert.EqualError(t, err, tt.wantErr.Error())
} else {
Expand Down Expand Up @@ -388,7 +388,7 @@ func TestParseMap(t *testing.T) {
copiedMapSection.SectionHeader = dummySection.SectionHeader
elfLoader.mapSection = &copiedMapSection
}
mapData, err := elfLoader.parseMap()
mapData, err := elfLoader.parseMap(BpfCustomData{})
if tt.wantErr != nil {
assert.EqualError(t, err, tt.wantErr.Error())
} else {
Expand Down Expand Up @@ -456,7 +456,7 @@ func TestParseProg(t *testing.T) {
err = elfLoader.parseSection()
assert.NoError(t, err)

mapData, err := elfLoader.parseMap()
mapData, err := elfLoader.parseMap(BpfCustomData{})
assert.NoError(t, err)

m.ebpf_maps.EXPECT().CreateBPFMap(gomock.Any()).AnyTimes()
Expand Down

0 comments on commit 2600200

Please sign in to comment.