]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librgw: remove deprecated/unused librgw personality
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 27 Jan 2016 16:48:58 +0000 (11:48 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:08:15 +0000 (12:08 -0500)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/test/Makefile-client.am
src/test/librgw.cc [deleted file]
src/test/librgw_link.cc [deleted file]

index bd7ec250da45ac2a92a66dbe300247b357f6f73d..612eee9660101a1f33d3f11052d54c0a66765aee 100644 (file)
@@ -614,18 +614,6 @@ test_build_librgw_CXXFLAGS = $(AM_CXXFLAGS)
 bin_DEBUGPROGRAMS += test_build_librgw
 endif # WITH_BUILD_TESTS
 
-#unittest_librgw_link_SOURCES = test/librgw_link.cc
-#unittest_librgw_link_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
-#unittest_librgw_link_LDADD = $(LIBRGW) ${UNITTEST_LDADD}
-#unittest_librgw_link_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-#check_TESTPROGRAMS += unittest_librgw_link
-
-#unittest_librgw_SOURCES = test/librgw.cc
-#unittest_librgw_LDFLAGS = -lrt $(PTHREAD_CFLAGS) -lcurl ${AM_LDFLAGS}
-#unittest_librgw_LDADD =  librgw.la $(LIBRADOS) ${UNITTEST_LDADD} -lexpat $(CEPH_GLOBAL)
-#unittest_librgw_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
-#check_TESTPROGRAMS += unittest_librgw
-
 ceph_test_cors_SOURCES = test/test_cors.cc
 ceph_test_cors_LDADD = \
        $(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
diff --git a/src/test/librgw.cc b/src/test/librgw.cc
deleted file mode 100644 (file)
index 5a360a7..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2011 New Dream Network
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "include/rados/librgw.h"
-
-#include "gtest/gtest.h"
-
-#include <stdint.h>
-
-static const char SAMPLE_XML_1[] = \
-"<AccessControlPolicy xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n\
-  <Owner>\n\
-    <ID>foo</ID>\n\
-    <DisplayName>MrFoo</DisplayName>\n\
-  </Owner>\n\
-  <AccessControlList>\n\
-    <Grant>\n\
-      <Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \
-xsi:type=\"CanonicalUser\">\n\
-       <ID>bar</ID>\n\
-       <DisplayName>display-name</DisplayName>\n\
-      </Grantee>\n\
-      <Permission>FULL_CONTROL</Permission>\n\
-    </Grant>\n\
-  </AccessControlList>\n\
-</AccessControlPolicy>";
-
-static const uint8_t VERSION1_BIN[] = {
-  0x01, 0x01, 0x07, 0x00, 0x00, 0x00, 0x63, 0x6d,
-  0x63, 0x63, 0x61, 0x62, 0x65, 0x07, 0x00, 0x00,
-  0x00, 0x63, 0x6d, 0x63, 0x63, 0x61, 0x62, 0x65,
-  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-  0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x63, 0x6d,
-  0x63, 0x63, 0x61, 0x62, 0x65, 0x01, 0x01, 0x00,
-  0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x63,
-  0x6d, 0x63, 0x63, 0x61, 0x62, 0x65, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f,
-  0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x63,
-  0x6d, 0x63, 0x63, 0x61, 0x62, 0x65, 0x0a, 0x0a
-};
-
-TEST(LibRGW, FromBin) {
-  int ret;
-  const char *bin = (const char*)VERSION1_BIN;
-  int len = sizeof(VERSION1_BIN) / sizeof(VERSION1_BIN[0]);
-  librgw_t rgw;
-
-  ret = librgw_create(&rgw, NULL);
-  ASSERT_EQ(ret, 0);
-
-  char *xml = NULL;
-  ret = librgw_acl_bin2xml(rgw, bin, len, &xml);
-  ASSERT_EQ(ret, 0);
-
-  librgw_shutdown(rgw);
-}
-
-TEST(LibRGW, RoundTrip) {
-
-  int ret;
-  char *bin = NULL;
-  int bin_len = 0;
-  librgw_t rgw;
-
-  ret = librgw_create(&rgw, NULL);
-  ASSERT_EQ(ret, 0);
-
-  ret = librgw_acl_xml2bin(rgw, SAMPLE_XML_1, &bin, &bin_len);
-  ASSERT_EQ(ret, 0);
-
-  char *xml2 = NULL;
-  ret = librgw_acl_bin2xml(rgw, bin, bin_len, &xml2);
-  ASSERT_EQ(ret, 0);
-
-  char *bin2 = NULL;
-  int bin_len2 = 0;
-  ret = librgw_acl_xml2bin(rgw, xml2, &bin2, &bin_len2);
-  ASSERT_EQ(ret, 0);
-
-  // the serialized representation should be the same.
-  ASSERT_EQ(bin_len, bin_len2);
-  ASSERT_EQ(memcmp(bin, bin2, bin_len), 0);
-
-  // Free memory
-  // As you can see, we ignore freeing memory on test failures
-  // Don't do this in your real programs!
-  librgw_free_bin(rgw, bin);
-  librgw_free_xml(rgw, xml2);
-  librgw_free_bin(rgw, bin2);
-
-  librgw_shutdown(rgw);
-}
diff --git a/src/test/librgw_link.cc b/src/test/librgw_link.cc
deleted file mode 100644 (file)
index f655a1e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2011 New Dream Network
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation.  See file COPYING.
- *
- */
-
-#include "gtest/gtest.h"
-
-TEST(LibrgwConfig, Link) {
-}
-
-