Skip to content

Commit d943f7d

Browse files
committed
tests: update assertions to match new keys and attr names
1 parent c1e4c0e commit d943f7d

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed

dev-packages/e2e-tests/test-applications/nuxt-3/tests/storage-aliases.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
3232
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
3333
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:user'),
3434
'db.operation.name': 'setItem',
35-
'db.collection.name': 'test-storage:',
35+
'db.collection.name': 'test-storage',
3636
'db.system.name': 'memory',
3737
});
3838
expect(setSpan?.description).toBe(prefixKey('alias:user'));
@@ -48,7 +48,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
4848
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:user'),
4949
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
5050
'db.operation.name': 'getItem',
51-
'db.collection.name': 'test-storage:',
51+
'db.collection.name': 'test-storage',
5252
'db.system.name': 'memory',
5353
});
5454
expect(getSpan?.description).toBe(prefixKey('alias:user'));
@@ -64,7 +64,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
6464
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:user'),
6565
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
6666
'db.operation.name': 'hasItem',
67-
'db.collection.name': 'test-storage:',
67+
'db.collection.name': 'test-storage',
6868
'db.system.name': 'memory',
6969
});
7070

@@ -79,7 +79,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
7979
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
8080
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:temp1'),
8181
'db.operation.name': 'removeItem',
82-
'db.collection.name': 'test-storage:',
82+
'db.collection.name': 'test-storage',
8383
'db.system.name': 'memory',
8484
});
8585
expect(delSpan?.description).toBe(prefixKey('alias:temp1'));
@@ -91,7 +91,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
9191
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
9292
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:temp2'),
9393
'db.operation.name': 'removeItem',
94-
'db.collection.name': 'test-storage:',
94+
'db.collection.name': 'test-storage',
9595
'db.system.name': 'memory',
9696
});
9797
expect(removeSpan?.description).toBe(prefixKey('alias:temp2'));

dev-packages/e2e-tests/test-applications/nuxt-3/tests/storage.test.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,27 @@ test.describe('Storage Instrumentation', () => {
3232
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
3333
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('user:123'),
3434
'db.operation.name': 'setItem',
35-
'db.collection.name': 'test-storage:',
35+
'db.collection.name': 'test-storage',
3636
'db.system.name': 'memory',
3737
});
38+
3839
expect(setItemSpan?.description).toBe(prefixKey('user:123'));
3940

4041
// Test setItemRaw spans
4142
const setItemRawSpans = findSpansByOp('cache.set_item_raw');
4243
expect(setItemRawSpans.length).toBeGreaterThanOrEqual(1);
44+
4345
const setItemRawSpan = setItemRawSpans.find(
4446
span => span.data?.[SEMANTIC_ATTRIBUTE_CACHE_KEY] === prefixKey('raw:data'),
4547
);
48+
4649
expect(setItemRawSpan).toBeDefined();
4750
expect(setItemRawSpan?.data).toMatchObject({
4851
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'cache.set_item_raw',
4952
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
5053
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('raw:data'),
5154
'db.operation.name': 'setItemRaw',
52-
'db.collection.name': 'test-storage:',
55+
'db.collection.name': 'test-storage',
5356
'db.system.name': 'memory',
5457
});
5558

@@ -64,7 +67,7 @@ test.describe('Storage Instrumentation', () => {
6467
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('user:123'),
6568
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
6669
'db.operation.name': 'hasItem',
67-
'db.collection.name': 'test-storage:',
70+
'db.collection.name': 'test-storage',
6871
'db.system.name': 'memory',
6972
});
7073

@@ -79,7 +82,7 @@ test.describe('Storage Instrumentation', () => {
7982
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('user:123'),
8083
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
8184
'db.operation.name': 'getItem',
82-
'db.collection.name': 'test-storage:',
85+
'db.collection.name': 'test-storage',
8386
'db.system.name': 'memory',
8487
});
8588
expect(getItemSpan?.description).toBe(prefixKey('user:123'));
@@ -97,7 +100,7 @@ test.describe('Storage Instrumentation', () => {
97100
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('raw:data'),
98101
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
99102
'db.operation.name': 'getItemRaw',
100-
'db.collection.name': 'test-storage:',
103+
'db.collection.name': 'test-storage',
101104
'db.system.name': 'memory',
102105
});
103106

@@ -108,7 +111,7 @@ test.describe('Storage Instrumentation', () => {
108111
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'cache.get_keys',
109112
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
110113
'db.operation.name': 'getKeys',
111-
'db.collection.name': 'test-storage:',
114+
'db.collection.name': 'test-storage',
112115
'db.system.name': 'memory',
113116
});
114117

@@ -124,7 +127,7 @@ test.describe('Storage Instrumentation', () => {
124127
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
125128
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('batch:1'),
126129
'db.operation.name': 'removeItem',
127-
'db.collection.name': 'test-storage:',
130+
'db.collection.name': 'test-storage',
128131
'db.system.name': 'memory',
129132
});
130133

@@ -135,7 +138,7 @@ test.describe('Storage Instrumentation', () => {
135138
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'cache.clear',
136139
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
137140
'db.operation.name': 'clear',
138-
'db.collection.name': 'test-storage:',
141+
'db.collection.name': 'test-storage',
139142
'db.system.name': 'memory',
140143
});
141144

dev-packages/e2e-tests/test-applications/nuxt-4/tests/storage-aliases.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
3232
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
3333
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:user'),
3434
'db.operation.name': 'setItem',
35-
'db.collection.name': 'test-storage:',
35+
'db.collection.name': 'test-storage',
3636
'db.system.name': 'memory',
3737
});
3838
expect(setSpan?.description).toBe(prefixKey('alias:user'));
@@ -48,7 +48,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
4848
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:user'),
4949
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
5050
'db.operation.name': 'getItem',
51-
'db.collection.name': 'test-storage:',
51+
'db.collection.name': 'test-storage',
5252
'db.system.name': 'memory',
5353
});
5454
expect(getSpan?.description).toBe(prefixKey('alias:user'));
@@ -64,7 +64,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
6464
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:user'),
6565
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
6666
'db.operation.name': 'hasItem',
67-
'db.collection.name': 'test-storage:',
67+
'db.collection.name': 'test-storage',
6868
'db.system.name': 'memory',
6969
});
7070

@@ -79,7 +79,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
7979
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
8080
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:temp1'),
8181
'db.operation.name': 'removeItem',
82-
'db.collection.name': 'test-storage:',
82+
'db.collection.name': 'test-storage',
8383
'db.system.name': 'memory',
8484
});
8585
expect(delSpan?.description).toBe(prefixKey('alias:temp1'));
@@ -91,7 +91,7 @@ test.describe('Storage Instrumentation - Aliases', () => {
9191
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
9292
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('alias:temp2'),
9393
'db.operation.name': 'removeItem',
94-
'db.collection.name': 'test-storage:',
94+
'db.collection.name': 'test-storage',
9595
'db.system.name': 'memory',
9696
});
9797
expect(removeSpan?.description).toBe(prefixKey('alias:temp2'));

dev-packages/e2e-tests/test-applications/nuxt-4/tests/storage.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test.describe('Storage Instrumentation', () => {
3232
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
3333
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('user:123'),
3434
'db.operation.name': 'setItem',
35-
'db.collection.name': 'test-storage:',
35+
'db.collection.name': 'test-storage',
3636
'db.system.name': 'memory',
3737
});
3838
expect(setItemSpan?.description).toBe(prefixKey('user:123'));
@@ -49,7 +49,7 @@ test.describe('Storage Instrumentation', () => {
4949
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
5050
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('raw:data'),
5151
'db.operation.name': 'setItemRaw',
52-
'db.collection.name': 'test-storage:',
52+
'db.collection.name': 'test-storage',
5353
'db.system.name': 'memory',
5454
});
5555

@@ -64,7 +64,7 @@ test.describe('Storage Instrumentation', () => {
6464
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('user:123'),
6565
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
6666
'db.operation.name': 'hasItem',
67-
'db.collection.name': 'test-storage:',
67+
'db.collection.name': 'test-storage',
6868
'db.system.name': 'memory',
6969
});
7070

@@ -79,7 +79,7 @@ test.describe('Storage Instrumentation', () => {
7979
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('user:123'),
8080
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
8181
'db.operation.name': 'getItem',
82-
'db.collection.name': 'test-storage:',
82+
'db.collection.name': 'test-storage',
8383
'db.system.name': 'memory',
8484
});
8585
expect(getItemSpan?.description).toBe(prefixKey('user:123'));
@@ -97,7 +97,7 @@ test.describe('Storage Instrumentation', () => {
9797
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('raw:data'),
9898
[SEMANTIC_ATTRIBUTE_CACHE_HIT]: true,
9999
'db.operation.name': 'getItemRaw',
100-
'db.collection.name': 'test-storage:',
100+
'db.collection.name': 'test-storage',
101101
'db.system.name': 'memory',
102102
});
103103

@@ -108,7 +108,7 @@ test.describe('Storage Instrumentation', () => {
108108
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'cache.get_keys',
109109
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
110110
'db.operation.name': 'getKeys',
111-
'db.collection.name': 'test-storage:',
111+
'db.collection.name': 'test-storage',
112112
'db.system.name': 'memory',
113113
});
114114

@@ -124,7 +124,7 @@ test.describe('Storage Instrumentation', () => {
124124
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
125125
[SEMANTIC_ATTRIBUTE_CACHE_KEY]: prefixKey('batch:1'),
126126
'db.operation.name': 'removeItem',
127-
'db.collection.name': 'test-storage:',
127+
'db.collection.name': 'test-storage',
128128
'db.system.name': 'memory',
129129
});
130130

@@ -135,7 +135,7 @@ test.describe('Storage Instrumentation', () => {
135135
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'cache.clear',
136136
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.cache.nuxt',
137137
'db.operation.name': 'clear',
138-
'db.collection.name': 'test-storage:',
138+
'db.collection.name': 'test-storage',
139139
'db.system.name': 'memory',
140140
});
141141

0 commit comments

Comments
 (0)