forked from chinmina/chinmina-bridge
-
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.
fix: OTEL schema incompatibility after upgrade
After the recent upgrade, the server failed to start because the OTel schema version had changed. This is undesirable behaviour: added a unit test to catch this easily before commit.
- Loading branch information
1 parent
6bbb904
commit 1014aea
Showing
2 changed files
with
30 additions
and
8 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
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,18 @@ | ||
package observe | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
"go.opentelemetry.io/otel/sdk/resource" | ||
) | ||
|
||
func Test_ResourceMerge(t *testing.T) { | ||
// Ensure that schema incompatibility on OTEL upgrades is detected before | ||
// merge | ||
_, err := resourceWithServiceName( | ||
resource.Default(), | ||
"serviceName") | ||
|
||
require.NoError(t, err) | ||
} |