-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade libssl3 libcrypto3 to solve CVE-2024-9143 #85
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
FROM alpine | ||
FROM alpine:3.20 | ||
|
||
RUN apk upgrade libssl3 libcrypto3 | ||
|
||
COPY assets/ /assets | ||
|
||
|
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 |
---|---|---|
|
@@ -20,6 +20,14 @@ type Fixture struct { | |
stateKey string | ||
} | ||
|
||
func tearDownFixture( | ||
t *testing.T, | ||
f *Fixture, | ||
) { | ||
t.Logf("Deleting default resources for %s", f.stateKey) | ||
deleteDefaultResources(f.portClient, f.stateKey) | ||
} | ||
|
||
func NewFixture(t *testing.T) *Fixture { | ||
stateKey := guuid.NewString() | ||
portClient := cli.New(config.ApplicationConfig) | ||
|
@@ -48,15 +56,19 @@ func (f *Fixture) CleanIntegration() { | |
|
||
func deleteDefaultResources(portClient *cli.PortClient, stateKey string) { | ||
_ = integration.DeleteIntegration(portClient, stateKey) | ||
_ = blueprint.DeleteBlueprintEntities(portClient, "workload") | ||
_ = blueprint.DeleteBlueprint(portClient, "workload") | ||
_ = blueprint.DeleteBlueprintEntities(portClient, "namespace") | ||
_ = blueprint.DeleteBlueprint(portClient, "namespace") | ||
_ = blueprint.DeleteBlueprintEntities(portClient, "cluster") | ||
_ = blueprint.DeleteBlueprint(portClient, "cluster") | ||
_ = page.DeletePage(portClient, "workload_overview_dashboard") | ||
_ = page.DeletePage(portClient, "availability_scorecard_dashboard") | ||
} | ||
|
||
func Test_InitIntegration_InitDefaults(t *testing.T) { | ||
f := NewFixture(t) | ||
defer tearDownFixture(t, f) | ||
e := InitIntegration(f.portClient, &port.Config{ | ||
StateKey: f.stateKey, | ||
EventListenerType: "POLLING", | ||
|
@@ -85,6 +97,7 @@ func Test_InitIntegration_InitDefaults(t *testing.T) { | |
|
||
func Test_InitIntegration_InitDefaults_CreateDefaultResources_False(t *testing.T) { | ||
f := NewFixture(t) | ||
defer tearDownFixture(t, f) | ||
e := InitIntegration(f.portClient, &port.Config{ | ||
StateKey: f.stateKey, | ||
EventListenerType: "POLLING", | ||
|
@@ -95,11 +108,12 @@ func Test_InitIntegration_InitDefaults_CreateDefaultResources_False(t *testing.T | |
_, err := integration.GetIntegration(f.portClient, f.stateKey) | ||
assert.Nil(t, err) | ||
|
||
testUtils.CheckResourcesExistence(false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
testUtils.CheckResourcesExistence(false, false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
} | ||
|
||
func Test_InitIntegration_BlueprintExists(t *testing.T) { | ||
f := NewFixture(t) | ||
defer tearDownFixture(t, f) | ||
if _, err := blueprint.NewBlueprint(f.portClient, port.Blueprint{ | ||
Identifier: "workload", | ||
Title: "Workload", | ||
|
@@ -123,11 +137,12 @@ func Test_InitIntegration_BlueprintExists(t *testing.T) { | |
_, err = blueprint.GetBlueprint(f.portClient, "workload") | ||
assert.Nil(t, err) | ||
|
||
testUtils.CheckResourcesExistence(false, f.portClient, f.t, []string{"namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
testUtils.CheckResourcesExistence(false, false, f.portClient, f.t, []string{"namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
} | ||
|
||
func Test_InitIntegration_PageExists(t *testing.T) { | ||
f := NewFixture(t) | ||
defer tearDownFixture(t, f) | ||
if err := page.CreatePage(f.portClient, port.Page{ | ||
Identifier: "workload_overview_dashboard", | ||
Title: "Workload Overview Dashboard", | ||
|
@@ -148,11 +163,12 @@ func Test_InitIntegration_PageExists(t *testing.T) { | |
_, err = page.GetPage(f.portClient, "workload_overview_dashboard") | ||
assert.Nil(t, err) | ||
|
||
testUtils.CheckResourcesExistence(false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"availability_scorecard_dashboard"}, []string{}) | ||
testUtils.CheckResourcesExistence(false, false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"availability_scorecard_dashboard"}, []string{}) | ||
} | ||
|
||
func Test_InitIntegration_ExistingIntegration(t *testing.T) { | ||
f := NewFixture(t) | ||
defer tearDownFixture(t, f) | ||
err := integration.CreateIntegration(f.portClient, f.stateKey, "", nil) | ||
if err != nil { | ||
t.Errorf("Error creating Port integration: %s", err.Error()) | ||
|
@@ -167,11 +183,12 @@ func Test_InitIntegration_ExistingIntegration(t *testing.T) { | |
_, err = integration.GetIntegration(f.portClient, f.stateKey) | ||
assert.Nil(t, err) | ||
|
||
testUtils.CheckResourcesExistence(false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
testUtils.CheckResourcesExistence(false, false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
} | ||
|
||
func Test_InitIntegration_LocalResourcesConfiguration(t *testing.T) { | ||
f := NewFixture(t) | ||
defer tearDownFixture(t, f) | ||
err := integration.CreateIntegration(f.portClient, f.stateKey, "", nil) | ||
if err != nil { | ||
t.Errorf("Error creating Port integration: %s", err.Error()) | ||
|
@@ -208,11 +225,12 @@ func Test_InitIntegration_LocalResourcesConfiguration(t *testing.T) { | |
assert.Equal(t, expectedResources, i.Config.Resources) | ||
assert.Nil(t, err) | ||
|
||
testUtils.CheckResourcesExistence(false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
testUtils.CheckResourcesExistence(false, false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
} | ||
|
||
func Test_InitIntegration_LocalResourcesConfiguration_ExistingIntegration_EmptyConfiguration(t *testing.T) { | ||
f := NewFixture(t) | ||
defer tearDownFixture(t, f) | ||
err := integration.CreateIntegration(f.portClient, f.stateKey, "POLLING", nil) | ||
if err != nil { | ||
t.Errorf("Error creating Port integration: %s", err.Error()) | ||
|
@@ -229,11 +247,12 @@ func Test_InitIntegration_LocalResourcesConfiguration_ExistingIntegration_EmptyC | |
assert.Nil(t, err) | ||
assert.Equal(t, "KAFKA", i.EventListener.Type) | ||
|
||
testUtils.CheckResourcesExistence(false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
testUtils.CheckResourcesExistence(false, false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
} | ||
|
||
func Test_InitIntegration_LocalResourcesConfiguration_ExistingIntegration_WithConfiguration_WithOverwriteConfigurationOnRestartFlag(t *testing.T) { | ||
f := NewFixture(t) | ||
|
||
expectedConfig := &port.IntegrationAppConfig{ | ||
Resources: []port.Resource{ | ||
{ | ||
|
@@ -275,5 +294,7 @@ func Test_InitIntegration_LocalResourcesConfiguration_ExistingIntegration_WithCo | |
assert.Nil(t, err) | ||
assert.Equal(t, expectedConfig.Resources, i.Config.Resources) | ||
|
||
testUtils.CheckResourcesExistence(false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
testUtils.CheckResourcesExistence(false, false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) | ||
defer tearDownFixture(t, f) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't you want to defer teardown fixture near its creation, like in other tests? |
||
|
||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider having one function for DeleteBlueprint, with just a flag to delete all entities