chore: 并入 iotlcm-upstream-chan 历史到 upstream-chan/(原提交 1e74497)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package upstreamapi
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestICCIDFromChannelCacheKey(t *testing.T) {
|
||||
tests := []struct{ key, want string }{
|
||||
{"sim:chan:iccid:89860000000000000004", "89860000000000000004"},
|
||||
{"sim:chan:iccid:8986000000000000007X", "8986000000000000007X"},
|
||||
{"sim:chan:iccid:", ""},
|
||||
{"unrelated:89860000000000000004", ""},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
if got := iccidFromChannelCacheKey(tt.key); got != tt.want {
|
||||
t.Errorf("iccidFromChannelCacheKey(%q) = %q, want %q", tt.key, got, tt.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user