-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: change ownership of Ruby gRPC client to FND: PC (#484)
* test: move Ruby specific tests to its own file for ownership reasons * chore: change ownership of Ruby gRPC client to FND: PC
- Loading branch information
Showing
3 changed files
with
40 additions
and
26 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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,36 @@ | ||
// Copyright 2024 Outreach Corporation. All Rights Reserved. | ||
|
||
// Description: Template tests specific to the Ruby gRPC client. | ||
|
||
package main_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/getoutreach/stencil/pkg/stenciltest" | ||
) | ||
|
||
func TestIncludeRubyToolVersionsIfRubyGRPCClient(t *testing.T) { | ||
st := stenciltest.New(t, "testdata/tool-versions-ruby/.tool-versions.tpl", libraryTmpls...) | ||
st.Args(map[string]interface{}{ | ||
"grpcClients": []interface{}{"ruby"}, | ||
}) | ||
st.Run(stenciltest.RegenerateSnapshots()) | ||
} | ||
|
||
func TestIncludeRubyToolVersionsIfRubyGRPCClientLibrary(t *testing.T) { | ||
// Need to use testdata because stenciltest cannot test file.Skip | ||
st := stenciltest.New(t, "testdata/tool-versions-ruby/.tool-versions.tpl", libraryTmpls...) | ||
st.Args(map[string]interface{}{ | ||
"grpcClients": []interface{}{"ruby"}, | ||
"service": false, | ||
"serviceActivities": []interface{}{}, | ||
}) | ||
st.Run(stenciltest.RegenerateSnapshots()) | ||
} | ||
|
||
func TestDontIncludeRubyToolVersionsIfNotRubyGRPCClient(t *testing.T) { | ||
st := stenciltest.New(t, "testdata/tool-versions-ruby/.tool-versions.tpl", libraryTmpls...) | ||
st.Args(map[string]interface{}{}) | ||
st.Run(stenciltest.RegenerateSnapshots()) | ||
} |