forked from flyteorg/flyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redis universal client (flyteorg#162)
* Move to Redis Universal Client to enable different Redis Configurations * generate flags * fix logs * fix comment * Comments * Comments
- Loading branch information
Showing
5 changed files
with
86 additions
and
5 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,25 @@ | ||
package handler | ||
|
||
import ( | ||
"bytes" | ||
"encoding/base64" | ||
"encoding/gob" | ||
"testing" | ||
|
||
"github.com/lyft/flytepropeller/pkg/controller/nodes/task/k8s" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
// A test to demonstrate how to unmarshal a serialized state from a workflow CRD. | ||
func TestDecodeTaskState(t *testing.T) { | ||
str := `I/+DAwEBC1BsdWdpblN0YXRlAf+EAAEBAQVQaGFzZQEGAAAABf+EAQIA` | ||
reader := base64.NewDecoder(base64.RawStdEncoding, bytes.NewReader([]byte(str))) | ||
dec := gob.NewDecoder(reader) | ||
st := &k8s.PluginState{} | ||
err := dec.Decode(st) | ||
if assert.NoError(t, err) { | ||
t.Logf("Deserialized State: [%+v]", st) | ||
assert.Equal(t, k8s.PluginPhaseStarted, st.Phase) | ||
} | ||
} |
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
2 changes: 2 additions & 0 deletions
2
pkg/controller/nodes/task/resourcemanager/config/config_flags.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
pkg/controller/nodes/task/resourcemanager/config/config_flags_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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