Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>pull/1255/head
parent
df50971744
commit
7e63800dee
@ -0,0 +1,7 @@
|
|||||||
|
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||||
|
|
||||||
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
|
COPY miniblog ./bin/miniblog
|
||||||
|
|
||||||
|
ENTRYPOINT ["./bin/miniblog"]
|
@ -1,8 +0,0 @@
|
|||||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
|
||||||
|
|
||||||
COPY openim-api /usr/bin/
|
|
||||||
|
|
||||||
# nosemgrep: dockerfile.security.missing-user.missing-user
|
|
||||||
ENTRYPOINT ["/usr/bin/openim-api"]
|
|
||||||
# nosemgrep: dockerfile.security.missing-user.missing-user
|
|
||||||
CMD ["--help"]
|
|
@ -1 +1 @@
|
|||||||
v3.2.0
|
v3.3.0
|
@ -1,22 +0,0 @@
|
|||||||
package tests
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestDeleteGroupMemberHash(t *testing.T) {
|
|
||||||
mockGroupDB := new(controller.MockGroupDatabase)
|
|
||||||
|
|
||||||
testGroupMemberHash := "testGroupMemberHash"
|
|
||||||
|
|
||||||
err := mockGroupDB.DeleteGroupMemberHash(testGroupMemberHash)
|
|
||||||
assert.Nil(t, err)
|
|
||||||
|
|
||||||
nonExistentGroupMemberHash := "nonExistentGroupMemberHash"
|
|
||||||
|
|
||||||
err = mockGroupDB.DeleteGroupMemberHash(nonExistentGroupMemberHash)
|
|
||||||
assert.NotNil(t, err)
|
|
||||||
}
|
|
@ -1,51 +0,0 @@
|
|||||||
package cache_test
|
|
||||||
|
|
||||||
import (
|
|
||||||
"reflect"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestRemoveRepeatedElementsInList(t *testing.T) {
|
|
||||||
testCases := []struct {
|
|
||||||
name string
|
|
||||||
input []string
|
|
||||||
expected []string
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
name: "No duplicates",
|
|
||||||
input: []string{"a", "b", "c"},
|
|
||||||
expected: []string{"a", "b", "c"},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "All duplicates",
|
|
||||||
input: []string{"a", "a", "a"},
|
|
||||||
expected: []string{"a"},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Some duplicates",
|
|
||||||
input: []string{"a", "b", "a", "c", "b"},
|
|
||||||
expected: []string{"a", "b", "c"},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Empty list",
|
|
||||||
input: []string{},
|
|
||||||
expected: []string{},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Single element",
|
|
||||||
input: []string{"a"},
|
|
||||||
expected: []string{"a"},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, tc := range testCases {
|
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
|
||||||
result := cache.RemoveRepeatedElementsInList(tc.input)
|
|
||||||
if !reflect.DeepEqual(result, tc.expected) {
|
|
||||||
t.Errorf("expected %v, got %v", tc.expected, result)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +1,3 @@
|
|||||||
module github.com/openimsdk/open-im-server/v3/tools/changelog
|
module github.com/openimsdk/open-im-server/v3/tools/changelog
|
||||||
|
|
||||||
go 1.18
|
go 1.19
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module github.com/openimsdk/open-im-server/v3/tools/component
|
module github.com/openimsdk/open-im-server/v3/tools/component
|
||||||
|
|
||||||
go 1.18
|
go 1.19
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module github.com/openimsdk/open-im-server/v3/tools/infra
|
module github.com/openimsdk/open-im-server/v3/tools/infra
|
||||||
|
|
||||||
go 1.18
|
go 1.19
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
module github.com/openimsdk/open-im-server/v3/tools/ncpu
|
module github.com/openimsdk/open-im-server/v3/tools/ncpu
|
||||||
|
|
||||||
go 1.18
|
go 1.19
|
||||||
|
|
||||||
require go.uber.org/automaxprocs v1.5.3
|
require go.uber.org/automaxprocs v1.5.3
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module github.com/openimsdk/open-im-server/v3/tools/versionchecker
|
module github.com/openimsdk/open-im-server/v3/tools/versionchecker
|
||||||
|
|
||||||
go 1.18
|
go 1.19
|
||||||
|
Loading…
Reference in new issue