-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6005 from oasisprotocol/kostko/feature/tdx-persis…
…tent-image go/runtime/host/tdx: Add support for persistent image overlay
- Loading branch information
Showing
10 changed files
with
154 additions
and
2 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 @@ | ||
go/runtime/host/tdx: Add support for persistent image overlay |
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
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
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
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
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,40 @@ | ||
package bundle | ||
|
||
import ( | ||
"strings" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/oasisprotocol/oasis-core/go/runtime/bundle/component" | ||
) | ||
|
||
func TestComponentValidation(t *testing.T) { | ||
require := require.New(t) | ||
|
||
// Test component names. | ||
var comp Component | ||
err := comp.Validate() | ||
require.ErrorContains(err, "unknown component kind") | ||
comp.Kind = component.ROFL | ||
|
||
for _, tc := range []struct { | ||
name string | ||
err string | ||
}{ | ||
{"", "ROFL component name must be at least 3 characters long"}, | ||
{strings.Repeat("a", 129), "ROFL component name must be at most 128 characters long"}, | ||
{"my invalid component name", "ROFL component name is invalid"}, | ||
{"my.invalid.component.name", "ROFL component name is invalid"}, | ||
{"my:invalid:component:name", "ROFL component name is invalid"}, | ||
{"my-valid-component-name", ""}, | ||
} { | ||
comp.Name = tc.name | ||
err = comp.Validate() | ||
if tc.err == "" { | ||
require.NoError(err) | ||
} else { | ||
require.ErrorContains(err, tc.err) | ||
} | ||
} | ||
} |
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
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
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
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