-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nikita Pivkin <[email protected]>
- Loading branch information
Showing
2 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package test | ||
|
||
import ( | ||
"github.com/aquasecurity/trivy/pkg/iac/providers/oracle" | ||
"github.com/aquasecurity/trivy/pkg/iac/state" | ||
trivyTypes "github.com/aquasecurity/trivy/pkg/iac/types" | ||
) | ||
|
||
var oracleTestCases = testCases{ | ||
"AVD-OCI-0001": { | ||
{ | ||
name: "Compute instance public reservation pool", | ||
input: state.State{Oracle: oracle.Oracle{Compute: oracle.Compute{ | ||
AddressReservations: []oracle.AddressReservation{ | ||
{ | ||
Metadata: trivyTypes.NewTestMetadata(), | ||
Pool: trivyTypes.String("public-ippool", trivyTypes.NewTestMetadata()), | ||
}, | ||
}, | ||
}}}, | ||
expected: true, | ||
}, | ||
{ | ||
name: "Compute instance cloud reservation pool", | ||
input: state.State{Oracle: oracle.Oracle{Compute: oracle.Compute{ | ||
AddressReservations: []oracle.AddressReservation{ | ||
{ | ||
Metadata: trivyTypes.NewTestMetadata(), | ||
Pool: trivyTypes.String("cloud-ippool", trivyTypes.NewTestMetadata()), | ||
}, | ||
}, | ||
}}}, | ||
expected: false, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters