lint changes
This commit is contained in:
parent
5fffb5cfb8
commit
0dfb1b1d4d
@ -5,14 +5,15 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/alcionai/clues"
|
"github.com/alcionai/clues"
|
||||||
|
"github.com/microsoft/kiota-abstractions-go/serialization"
|
||||||
|
"github.com/microsoftgraph/msgraph-sdk-go/models"
|
||||||
|
"github.com/microsoftgraph/msgraph-sdk-go/teams"
|
||||||
|
|
||||||
"github.com/alcionai/corso/src/internal/common/ptr"
|
"github.com/alcionai/corso/src/internal/common/ptr"
|
||||||
"github.com/alcionai/corso/src/internal/m365/graph"
|
"github.com/alcionai/corso/src/internal/m365/graph"
|
||||||
"github.com/alcionai/corso/src/pkg/backup/details"
|
"github.com/alcionai/corso/src/pkg/backup/details"
|
||||||
"github.com/alcionai/corso/src/pkg/fault"
|
"github.com/alcionai/corso/src/pkg/fault"
|
||||||
"github.com/alcionai/corso/src/pkg/logger"
|
"github.com/alcionai/corso/src/pkg/logger"
|
||||||
"github.com/microsoft/kiota-abstractions-go/serialization"
|
|
||||||
"github.com/microsoftgraph/msgraph-sdk-go/models"
|
|
||||||
"github.com/microsoftgraph/msgraph-sdk-go/teams"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@ -76,7 +77,6 @@ func (c Channels) GetChannelByName(
|
|||||||
ByTeamId(teamID).
|
ByTeamId(teamID).
|
||||||
Channels().
|
Channels().
|
||||||
Get(ctx, options)
|
Get(ctx, options)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, graph.Stack(ctx, err).WithClues(ctx)
|
return nil, graph.Stack(ctx, err).WithClues(ctx)
|
||||||
}
|
}
|
||||||
@ -110,9 +110,7 @@ func (c Channels) GetMessage(
|
|||||||
teamID, channelID, itemID string,
|
teamID, channelID, itemID string,
|
||||||
errs *fault.Bus,
|
errs *fault.Bus,
|
||||||
) (serialization.Parsable, *details.GroupsInfo, error) {
|
) (serialization.Parsable, *details.GroupsInfo, error) {
|
||||||
var (
|
var size int64
|
||||||
size int64
|
|
||||||
)
|
|
||||||
|
|
||||||
message, err := c.Stable.
|
message, err := c.Stable.
|
||||||
Client().
|
Client().
|
||||||
@ -161,9 +159,7 @@ func (c Channels) GetReplies(
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
func ChannelMessageInfo(msg models.ChatMessageable, size int64) *details.GroupsInfo {
|
func ChannelMessageInfo(msg models.ChatMessageable, size int64) *details.GroupsInfo {
|
||||||
var (
|
created := ptr.Val(msg.GetCreatedDateTime())
|
||||||
created = ptr.Val(msg.GetCreatedDateTime())
|
|
||||||
)
|
|
||||||
|
|
||||||
return &details.GroupsInfo{
|
return &details.GroupsInfo{
|
||||||
ItemType: details.TeamsChannelMessage,
|
ItemType: details.TeamsChannelMessage,
|
||||||
|
|||||||
@ -4,11 +4,12 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/alcionai/clues"
|
"github.com/alcionai/clues"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/suite"
|
||||||
|
|
||||||
"github.com/alcionai/corso/src/internal/common/ptr"
|
"github.com/alcionai/corso/src/internal/common/ptr"
|
||||||
"github.com/alcionai/corso/src/internal/tester"
|
"github.com/alcionai/corso/src/internal/tester"
|
||||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
"github.com/stretchr/testify/suite"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChannelPagerIntgSuite struct {
|
type ChannelPagerIntgSuite struct {
|
||||||
@ -59,7 +60,7 @@ func (suite *ChannelPagerIntgSuite) TestChannels_Get() {
|
|||||||
assert.NoError(t, err, clues.ToCore(err))
|
assert.NoError(t, err, clues.ToCore(err))
|
||||||
assert.Equal(t, ptr.Val(channel.GetDisplayName()), containerName)
|
assert.Equal(t, ptr.Val(channel.GetDisplayName()), containerName)
|
||||||
|
|
||||||
// GET channel -should not be found anymore
|
// GET channel -should be found
|
||||||
_, err = chanClient.GetChannel(ctx, teamID, ptr.Val(channel.GetId()))
|
_, err = chanClient.GetChannel(ctx, teamID, ptr.Val(channel.GetId()))
|
||||||
assert.Error(t, err, clues.ToCore(err))
|
assert.NoError(t, err, clues.ToCore(err))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user