blob: 0d4b5abebf6f8ab2b38b4d5ed4bd6981277122d2 [file] [log] [blame]
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Package familylink is used for writing Family Link tests.
package familylink
import (
"context"
"time"
"chromiumos/tast/local/chrome"
"chromiumos/tast/local/chrome/familylink"
"chromiumos/tast/testing"
)
func init() {
testing.AddTest(&testing.Test{
Func: UnicornLogin,
Desc: "Checks if Unicorn login is working",
Contacts: []string{"chromeos-sw-engprod@google.com", "cros-oac@google.com", "tobyhuang@chromium.org", "cros-families-eng+test@google.com"},
Attr: []string{"group:mainline", "informational"},
SoftwareDeps: []string{"chrome"},
Timeout: chrome.GAIALoginTimeout + time.Minute,
Fixture: "familyLinkUnicornLogin",
})
}
func UnicornLogin(ctx context.Context, s *testing.State) {
cr := s.FixtValue().(*familylink.FixtData).Chrome
tconn := s.FixtValue().(*familylink.FixtData).TestConn
if cr == nil {
s.Fatal("Failed to start Chrome")
}
if tconn == nil {
s.Fatal("Failed to create test API connection")
}
}