t_pkg_depotd.py revision 2230
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER START
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# The contents of this file are subject to the terms of the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Common Development and Distribution License (the "License").
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You may not use this file except in compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# See the License for the specific language governing permissions
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# When distributing Covered Code, include this CDDL HEADER in each
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# If applicable, add the following below this CDDL HEADER, with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# fields enclosed by brackets "[]" replaced with your own identifying
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# information: Portions Copyright [yyyy] [name of copyright owner]
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER END
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunningtonclass TestPkgDepot(pkg5unittest.SingleDepotTestCase):
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington # Only start/stop the depot once (instead of for every test)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster open foo@1.0,5.11-0
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster add dir path=tmp/foo mode=0755 owner=root group=bin
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster open bar@1.0,5.11-0
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster add dir path=tmp/bar mode=0755 owner=root group=bin
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster open quux@1.0,5.11-0
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington add dir mode=0755 owner=root group=bin path=/bin
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington add file tmp/cat mode=0555 owner=root group=bin path=/bin/cat
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington add file tmp/libc.so.1 mode=0555 owner=root group=bin path=/lib/libc.so.1
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster open info@1.0,5.11-0
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster open update@1.0,5.11-0
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster open update@1.1,5.11-0
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster open system/libc@1.0,5.11-0
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster add set name="description" value="Package to test package names with slashes"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster add dir path=tmp/foo mode=0755 owner=root group=bin
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster add depend type=require fmri=pkg:/SUNWcsl
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster # This suite, for obvious reasons, actually needs a depot.
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington pkg5unittest.SingleDepotTestCase.setUp(self, start_depot=True)
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington """ Ping the depot several times """
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington """ Start and stop the depot several times """
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster """ Send package quux@1.0 an action at a time, restarting the
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington depot server after each one is sent, to ensure that
ce4d3fddc8fe2eddd68a20af9570b3cc63ece5abNeil Madden transactions work across depot restart. Then verify that
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Madden the package was successfully added by performing some
a82d04bc19fee9d5e34b41ccd7641da1f62ab634Neil Madden basic operations. """
f.close()
f.close()
f.close()
"/usr/lib/pkg.depotd")
"feed.xml")
if check_feed:
if pub:
pub))
if not pub_repo:
repo_cfg = {
pub_repo_cfg = {
mode_methods = [
pages = [
"en/catalog.shtml",
"en/index.shtml",
"en/search.shtml",
"en/stats.shtml",
if with_packages:
if set_method:
if unset_method:
if not pub_repo:
uris = []
for u in returned:
for p in plist:
for p in plist:
except Exception, e:
"en/search.shtml?action=Search&token=*")
"en/advanced_search.shtml?action=Search&token=*")
"en/advanced_search.shtml?token=*&show=a&rpp=50&"